If you haven’t yet placed your Clickstream JavaScript snippet on your site, you can use Google Tag Manager for this. Google Tag Manager is a tag management system (TMS) that allows you to quickly and easily update measurement codes and related code fragments collectively known as tags on your website. To save time and confusion, review the Google documentation Considerations before you install and Set up and install Tag Manager.
Grab your Clickstream JavaScript snippet from Delivra
- Click on the Settings icon in your account and select "Integrations" from the drop-down menu. > Locate and click the "Clickstream / Browse Tracking" button.
- In the pop-up, click the info icon for instructions.
The following is sample tracking code (and should not be copied). The code is unique to your account.
<script> (function(d,s,i){ function init() { if(!i) { i = true; DlvTracking.init({ listName: 'Your List Name', autoTrackPageview: true, /* optional init properties */ }); /* additional tracking functions */ } } var f=d.getElementsByTagName(s)[0],j=d.createElement(s); j.async=true; j.src='https://integration.delivra.com/tracking/cs/v3/dltr.js'; j.onload=init; f.parentNode.insertBefore(j,f); })(document,'script'); </script> |
Place Clickstream JavaScript snippet on webpages
- In Google Tag Manager, click New Tag.
- Add a name to your tag (such as “Delivra Clickstream JavaScript”).
- Click the Tag Configuration module and select Custom HTML.
- Copy and paste your JavaScript tracking snippet.
- Click on the Triggering module.
- Select All Pages and click the blue Save button located in the upper right-hand corner of the tag configuration.
Tag Pageviews
We recommend applying tags (MetaTagsName) to your webpages to group similar content together. This tag can be used in segmentation, lead & contact scoring, and automation evaluations. You may use an unlimited number of tags. For example, when building lead score clauses to adjust scores based on page view data for area rugs, if MetaTagsName is used, you can include a clause to find all pages tagged "area rugs" rather than inserting all specific URLs for pages that contain area rugs on your web site. Tags can be used with both General Clickstream & Purchase tracking and Anonymous Clickstream tracking.
The following is an example of how to implement pageview tags.
Customize the highlighted areas to suit your website and tracking goals.
<script> (function(d,s,i){ function init() { if(!i) { i = true; DlvTracking.init({ listName: 'Your List Name', autoTrackPageview: false, /* optional init properties */ });
var tags = []; Window.location.pathname.startswith ('https://www.delivra.com/features') && tags.push('Features'); window.location.pathname.match('https://www.delivra.com') && tags.push('Homepage'); window.location.pathname.includes('/pricing') && tags.push('Pricing'); window.location.pathname.includes('/blog/') && tags.push('Blog'); window.location.pathname.includes('/webinars/') && tags.push('Webinars'); DlvTracking.track('pageview', { url: window.location.pathname, tags: tags }); } } var f=d.getElementsByTagName(s)[0],j=d.createElement(s); j.async=true; j.src='https://integration.delivra.com/tracking/cs/v3/dltr.js'; j.onload=init; f.parentNode.insertBefore(j,f); })(document,'script'); </script> |
Testing
Now that your tag is published, you’ll want to make sure it is active on your website and firing correctly, sending data back to Delivra.
Validate that your JavaScript code fires upon page load on your website
-
- Navigate back to your Google Tag Manager Workspace and select Preview and Debug.
- Follow instructions here: https://support.google.com/tagmanager/answer/6107056
Validate that your pageview tags are seen in Delivra when pages are viewed
-
- Send an email from Delivra that includes links to your website.
- When you receive the email, clickthrough to your website and visit pages where the clickstream script & tags have been placed.
- Then return to Delivra to verify that tag information can be seen in features that use it. In this example we will create a page view segment.
- Navigate to the Segments dashboard and create a new segment.
- From the clause menu, choose Viewed:
- In the pop-up, you should see tags appear in the dropdown menu:
Submit your Google Tags Manager changes
It’s important that you remember to submit your workspace changes in order for them to take effect once preview mode is turned off.
- Click Submit in the upper right-hand of the GTM view
- Add a message with your change
Comments
0 comments
Article is closed for comments.