How can I import the SiteData template to Google Tag Manager?

You can think of Sleeknote SiteData as a bucket where you can put in information.

When you put that information in the SiteData bucket, you can use it for several things, such as deciding if a campaign should show or not for a specific visitor, based on their basket value, basket items, operating system, and so on.

Sending Data Directly to SiteData

Sleeknote SiteData has a lot of similarities with Google Tag Manager's dataLayer.

To get the best performance of Sleeknote SiteData, follow these best practices:

  • Add the following snippet of code to the head of your page as far up as possible:
<script>
window.sleeknoteSiteData || (window.sleeknoteSiteData = []);
</script>

Whenever you want to add information to SiteData do the following:

window.sleeknoteSiteData.push({'attributeName': 1234});

attributeName is the name of the attribute you are sending to SiteData, and 1234 is the value.


Note:
If you send a string value to SiteData, it should be in quotes, following standard Javascript object notation.

window.sleeknoteSiteData.push({'attributeName': 'yes'});

Using Google Tag Manager to Send Data to SiteData

If you have already have data available in Google Tag Manager, you can send it to SiteData with a Custom HTML tag.

Follow this guide to send your existing GTM variables to SiteData: How to Send Data to SiteData in Google Tag Manager

Using the Google Tag Manager Sleeknote SiteData Template

To get started easily with GTM and SiteData, you can download our GTM template here.

This template contains the following:

  • 1 GTM variable named DL_Variable with the Data Layer Variable Name "VariableName"

  • 1 GTM trigger named DL_Variable Event with the event name "DL_Variable_Event"

  • 1 GTM Tag with the name Send DL_Variable to Sleeknote SiteData that sends the GTM variable DL_Variable to SiteData with the name VariableName

The variable, trigger, and tag name are only placeholders, and they should be renamed to something appropriate for the data you're sending to SiteData.

Note: Your site may already be sending information to your GTM through the GTM dataLayer. In that case, you just need to create a GTM tag that sends that attribute to SiteData whenever the trigger is firing. Then, you can use that information in Sleeknote to determine when to show and hide your campaigns.

Download the Datalayer Checker extension if you have any doubts about what data your website is pushing to GTM.