Link Tracking Tests
Right-click and view source on any link to see what the code looks like.
Anchor
Click to go to the anchor further below.
Telephone
Data vars test: (555) 555-1234 (custom event example)
Test email (tracked by default)
Data vars test: Test email (custom event)
Custom Attributes
Go to Homepage (simple custom event example)
Go to Homepage (internal-link custom event)
Shop (cta custom event)
Shop (another internal custom event)
Custom Event with Dynamic Link Label —The original data-vars-ga-label is replaced dynamically via JavaScript.
UTM
This a test of a self-hosted UTM parameter link.
This is where an anchor link will land
This is some anchor text. Click on Link Tracking > Anchor Tracking in the main menu to get here.
Internal Link (not tracked)
Go to Shop page (internal click not tracked by default)
Outbound Links
Plain link
About caught my eye (outbound link tracked by default)
Link with data-vars-ga-label set
This is an outbound link with data-vars-ga-label set.
This is handy if you’re link text isn’t descriptive.
<p>
This is an
<a href="https://www.caughtmye.cc" id="custom-outbound-link" data-vars-ga-label="This is a link that overrides the link text ;-)">
outbound link
</a>
with data-vars-ga-label set.
</p>
Image Link
This is an image link. The image has alt text set, so the alt text will be used as the event label.

Custom Social Share Events
Each link below sends a custom event to GA.
Facebook • Twitter • Instagram
GA realtime results

HTML source code
<a
href="https://www.facebook.com"
onclick="sendSocialClick('Facebook', 'https://streetphotography.blog');"
target="_blank">
Facebook
</a>
JavaScript souce code
See the JavaScript code on GitHub.