How to Upload Sleeknote SiteData GTM Templates to GTM

Before you can import a Google Tag Manager (GTM) container you need to download a template to upload here: https://sleeknotestaticcontent.sleeknote.com/sitedata-templates/GTM_dataLayer-Sleeknote_SiteData.json

Once you’ve downloaded your template you can import it into GTM by following the below steps.

How to Import a Template into Google Tag Manager:

  1. Log into your GTM account and click the “Admin” tab.
1-27

2. Click “Import Container”

1,2

3. Upload your newly downloaded template from your computer.

2-6

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

step 4

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

step_5

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

6-2

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

7-1

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

8-1

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

Here’s how:

  1. Go to “Variables”
9

2. Find your new variable (it’s the one called ‘DL_Variable) and click on it

10

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

11

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'});.

(TIP: You can download Datalayer Checker 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.)

12

5. Choose “Version 2” from the dropdown

13

6. Click “Save”

7. Go to “Triggers”. The triggers are what determines when your data should be sent to our SiteData storage.

14

8. Find your new trigger template (it’s the one called DL_Variable Event) and click on it.

15

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

16

10. Now you need to define what event should trigger the data you want to send. This is to identify the event that sends the data to our Sitedata so it’s important that the name you input in this field is an exact match to the event in your data layer. For this example, I could trigger an event every time someone adds an item to their cart. This event could be named ‘AddtoCart’ (NOTE: this event might be called something different in your data layer so make sure to check before you enter the event name)

17

12. Choose “All Custom Events”. 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.

18

12. Click “Save”

13. Go to “Tags”

19

14. Find your new tag (it’s the one called ‘Send DL_Variable to Sleeknote SiteData’) and click on it.

20

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

21

16. Find “VariableName” in the HTML script and give it a new name so you can identify it. It doesn’t matter what the name is, but we recommend giving it the same name as your variable for easy identification and simplicity. This is the name you have to enter when you set up the SiteData condition for your Sleeknote campaigns. In this example, we’ll name it TotalBasketValue.

22

17. Find “DL_Variable” and change this to the same name as your variable. It’s important that this name exactly matches the variable name in your data layer. In this example it would be TotalBasketValue. (TIP: If you delete and start typing {{, you’ll get a list of your variables to choose from as shown below)

23

18. Click “Save”

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

24

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

Now you send the above data to our SiteData storage and you can set up your campaign based on the above data.

If you want to send more data, you simply repeat the above steps. You can add as many variables, triggers, and events as you’d like.

How to Set Up a Sleeknote Campaign with Our SiteData Condition

When you’ve created your campaign and get to the settings step you can trigger your campaign based on the data you set up above. Here’s how:

  1. Click “Change Rule”
25

2. Scroll down and click “Add Another Condition”

26

3. Choose the “SiteData Detection” condition

27

4. Decide if you want to hide or show your campaign based on your site data

28

5. Enter the name of your GTM variable. If we use the same example as above this would be ‘TotalBasketValue’.

29

6. Choose if the value for the variable should match, be less than, or greater than, etc. to show or hide your campaign.

30

7. Enter the value of your variable. If we use basket value as an example we could enter ‘50’ and then the campaign will only show to users who have a basket value of less than 50 (provided we choose ‘less than’ in the previous step).

31

8. Click “Save”