How to Send Data to SiteData in Google Tag Manager

Learn how to send your GTM variables to our SiteData storage, to use our SiteData condition and merge tags.

If you want to send your existing variables to our SiteData storage, you need to create a tag in Google Tag Manager.


To do that, click "New" on the "Tags" page:


Next, click "Choose a Tag" under "Tag Configuration" and select "Custom HTML". Then, copy the script on this Notion link and paste it to the field:

Now, you need to replace "GTM Variable" with the GTM variable name you want to send to SiteData.
 
For example, if you have a variable in your checkout, sending visitors' cart value to your GTM, it could look like this:



Copy this GTM variable name and paste it into the Custom HTML tag from earlier:
 
Now, replace "Your SiteData Variable" with the name you want to call it when you use it in Sleeknote.

Now your tag is set up. Next, you need to choose a trigger to decide when your tag will be fired.
To do that, click "Choose a Trigger" right below the section where you added your tag:
For example, in our case, we want to trigger this tag when a visitor enters checkout. So, we made a custom event for that called "Checkout", and we'll use it as a trigger for our tag.


Click "Save" to save your tag.
Next, click "Submit" to submit your changes. 
Finally, click "Publish" and set your changes live.
Now you can use this SiteData variable in your Sleeknote account both as a targeting option and a merge tag. 🎉

To use your SiteData variable as a targeting option, simply visit the Display Settings step of your Campaign Builder and switch "SiteData" on.

Insert your SiteData variable and decide if it should be present, contains, greater than, and so on, for your campaign to show or hide. In our case, we might want to show a campaign when a visitor has over 500 in their cart:

Now our campaign will only show to visitors who have over 500 worth of items in their basket. 😉


Check out this article to learn how to use your SiteData variables as merge tags in your campaigns.

 

💡 Need inspiration for how to use SiteData on your site? Check out this page to read about SiteData use cases.