How can I target a specific device?

With SiteData, you can show your campaigns only on specific devices, such as Windows computers or Android smartphones.


To do this, first, you need to create a Google Tag Manager variable that picks up this type of information through the visitor’s browser.


Watch this video to learn how or follow the steps below. 👇


How to Set Up a GTM Variable


  1. Go to Google Tag Manager and click “Variables.”
  2. Click “New” under “User-Defined Variables.”
  3. Click “Choose a variable type to begin setup…” and select “Data Layer Variable” among variable types. 
  4. Type “navigator.platform” as the Data Layer Variable Name.
  5. Give your GTM variable a clear, memorable name. (Hint: You can call it “navigator.platform” too.)
  6. Click “Save.”


To send this variable to Sleeknote SiteData, you now need to create the right tag.


How to Set Up a Tag


  1. Click “Tags” and then “New”.
  2. Click “Choose a tag type to begin setup…”
  3. Select “Custom HTML” among tag types.
  4. Copy and paste the SiteData script from this page.
  5. Replace “GTM Variable” with the exact name of the variable you just created. (In our example, we name it “navigator.platform”.)
  6. Replace “Your SiteData Variable” with what you want to call it in Sleeknote. For example, we’ll name it “Device” and in a minute, we’ll use this name in Sleeknote.


7. Move down to “Triggering” and click “Choose a trigger to make this tag fire…”

8. Click “All Pages” (unless you have other preferences) and “Save.”

9. Name your tag, such as “SiteData Device” and click “Save” again.

10. Finally, make sure to click “Submit” and “Publish” to set these changes live on your site.

Now, head over to your Sleeknote account and set up the targeting options for the campaign you want to show on a specific device.


How to Set Up the SiteData Targeting Option


  1. Log in to Sleeknote and go to “Step 3: Targeting Options” in your campaign builder.
  2. Scroll down and enable the SiteData condition.
  3. Enter the name of your SiteData variable exactly as it is in Google Tag Manager. (For example, we just named it “Device” earlier.)
  4. Choose “contains” from the dropdown menu and write the value you’d like to target, for example, “Android.”
  5. Decide if you want to “show” or “hide” your campaign for this device.
  6. Click “Add”.
  7. Save your campaign as usual.


Now, your campaign will only show to visitors with an Android device.


Use these values to target the following devices and operating systems: iPhone, Android, Win, Mac.


For example, if you want to target Mac computers, use “contains” and write “Mac” as property value.

Hint: Similarly, you can target visitors’ browser language by using “navigator.language” instead of “navigator.platform” in your dataLayer.