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

Click this link to download our ready-made SiteData template.

Now you can import this template to your Google Tag Manager (GTM) and start editing it.

Don't need to use a template? Read this guide to learn how to send your variables to SiteData.

  1. Log in to your GTM account and click the “Admin” tab.

2. Click “Import Container”.

3. Upload the template you downloaded in the first step from your computer.

4. Choose “Existing” workspace, and choose which of your workspaces you want to import the container to (if you have more than one workspace).

5. Click “Merge” and “Rename conflicting tag, triggers and variables” to ensure you don’t overwrite any of your existing content.

6. Then you’ll see an overview of the new changes. Click “Confirm”.

7. Click “Submit” in the top right corner.

8. Give your new container a name and click “Publish” to put your changes into effect.

Now you have the variable, tag, and trigger templates in your GTM. Next, you need to edit them manually to make sure they send the right data.

Here’s how:

  1. Go to the “Variables” tab.

2. Find your new variable (called "DL_Variable") and click it.

3. Give your new variable a name for your own identification. For this example, we’ll name it TotalBasketValue.

4. Define your variable by naming it.

It’s important that the name matches the same data in your data layer. This is the name of the data layer variable to read from. The value of a data layer variable named 'TotalBasketValue', for example, is set to 'value' when the following code on your website is executed:

dataLayer.push({'TotalBasketValue': 'value'});

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

For this example, we’ll choose ‘TotalBasketValue’. (It’s easier to use the same name throughout to avoid confusion.)

5. Choose “Version 2” from the dropdown and click “Save”.

6. Go to “Triggers”. The triggers determine when your data should be sent to our SiteData storage.

7. Find your new trigger template ("DL_Variable Event") and click it.

8. Name your trigger for your own identification. For this example, we’ll name it ‘AddtoCart’.

9. Define what event should trigger the data you want to send.

This is to identify the event that sends the data to our storage, so it’s important that the name you enter in this field is an exact match to the event in your data layer.

For this example, we’ll trigger an event every time someone adds an item to their cart. This event could be named ‘AddtoCart’ in our GTM.

⚠️ Note: This event might be called something different in your data layer, so make sure to check before you enter the event name.

10. Choose “All Custom Events” and click “Save”.

This means the data will be sent every time this event happens. (In this example, every time a visitor adds an item to their cart.)

11. Next, go to the “Tags” tab.

11. Find your new tag (‘Send DL_Variable to Sleeknote SiteData’) and click it.

12. Name your tag.

We recommend giving your tag the same name as your new variable. In this example, it would be TotalBasketValue.

13. Find “VariableName” in the HTML script and give it a new name so you can identify it. 

We recommend giving it the same name as your variable for easy identification and simplicity. In this example, we’ll name it TotalBasketValue.

🚨 Important: This is the name you’ll enter when you set up the SiteData condition for your Sleeknote campaign.

14. Change “DL_Variable” to the same name as your variable, and click “Save”.

It’s important that this name exactly matches the variable name in your data layer. In this example, it would be TotalBasketValue.

🤓 Pro Tip: If you delete “DL_Variable” and start typing {{, you’ll get a list of your variables to choose from.

15. Click “Submit” in the top right corner.

16. Give your new changes a name and click “Publish” to put your changes into effect.

Now that you’re sending the above data to our SiteData storage, you can use it both as a condition to show or hide your Sleeknote campaigns, as a trigger, and as merge tags to personalize your campaign copy.

Simply repeat the above steps to send more data to us, and add as many variables, triggers, and events as you’d like.

Need inspiration on how to use SiteData? Check out these resources: