We store data collected from the Web behavior tracking script in an Insight data collection called
Webinsights. This data captures your customers' activity on your website after clicking through from one of your campaigns or browsing your store from a known Shopify customer account.
Browsing activity is captured, stored and then made available for use in creating segments, powering programs, and sending abandoned cart campaigns.
Web behavior tracking installation
There are two methods you can use to install Web behavior tracking on your Shopify store:
Automatic installation (Recommended)
This is done by simply mapping an abandoned cart program to your Shopify store from your Dotdigital account.
This is done by creating a Web behavior tracking profile and adding the Web behavior tracking script to your Shopify store.
Mapping a program automatically installs code on your connected Shopify store to enable Web behavior tracking, abandoned cart, and abandoned browse functionality.
Map an abandoned cart program
In Dotdigital go to Connect > Shopify and find the heading Abandoned cart.
Expand the Enrol abandoned carts to drop-down menu and choose an abandoned cart program from the list.
The program does not have to be active.
To manual install Web behavior tracking on your Shopify store:
1. Create a Web behavior tracking profile
To set up your Web behavior tracking profile and get your unique ID:
In Dotdigital, expand the User menu and select Settings
Go to Access > Web behavior tracking.
Select NEW PROFILE.
For Name, enter a name for your profile. This can be anything you want, but make it recognisable.
For Website domains, enter each domain you want to add the tracking script to. You can add a maximum of 15 unique domains. You must exclude
https://www– for https://www.example.com, just enter
If you want to use Abandoned cart on your store:
Toggle the Track abandoned carts switch to active.
If you want to enable abandoned carts for guests, toggle the Enable guest carts switch to active.
Copy your Unique ID. You need this in the next step of setup.
2. Add the Web behavior tracking script
To add our Web behavior tracking script to your Shopify store:
In Shopify admin, go to Sales channels > Online Store > Themes.
Expand the Actions drop-down menu, then select Edit code.
Under Layout, select the file theme.liquid.
</head>tag, paste the following code and embed it between
var dm_insight_id ='uniqueID';(function(w,d,u,t,o,c)
document, '//static.trackedweb.net/js/_dmptv4.js', 'script', 'dmPt');
Replace the placeholder uniqueID in the code with your Web behavior tracking profile ID. This is the ID you copied in Step 1.8. You must retain the quotation marks.
Check it's working
Once you've set up Web behavior tracking on your Shopify store, it can take up to one hour before you start seeing data reflected in Dotdigital.
To check you're tracking data and associating it to a contact correctly:
Send yourself an email campaign that includes a link to your store.
To learn how, check out the Email basics section of the Help Centre. This must be a live send, test sends do not track browsing sessions.
Open the link from the email, and browse a few pages of your store.
Wait one hour, then, in Dotdigital, go to Audience > Contacts.
Find and select the contact you sent the campaign to.
On their Single customer view, select the Insight data tab, expand the collection type drop-down menu and select Webinsights. You can select an individual record from the left side to view it.