How to add @dub/analytics to your Google Tag Manager site
Create a New Tag
Add the Dub Analytics Script
data-domains
property to enable client-side click-tracking.Configure the Trigger
Save and Publish
_dubAnalytics
– if the script is installed correctly, you should see the _dubAnalytics
object in the console.?dub_id=test
query parameter to your website URL and make sure that the dub_id
cookie is being set in your browser.<head>
section of the page@dub/analytics
script to customize its behavior:
first-click
: The first click model
gives all the credit to the first touchpoint in the customer journey.last-click
: The last click model gives all the credit to the last
touchpoint in the customer journey.?via=abc123
).