If you already created custom variables in Google Tag Manager, you can use them in Wisepops.

To do so, add the following code after your Wisepops setup code:

// Send custom properties
wisepops('properties', {
VariableNameForWisepops: '{{VariableNameOfGTM}}'

Here is a quick example. Let's say you want to exclude your newsletter subscribers from seeing your users. Your GTM variable is called Subscribed. You want to use it with the name "subscribed" in Wisepops. Here's the code we would add:

// Send custom properties 
wisepops('properties', {
subscribed: '{{subscribed}}'


Ensure that the Wisepops trigger is not "Page view", but "DOM Ready". This is what your setup code would look like in Google Tag Manager.

You can then use that new variable in your custom conditions to make sure your campaign is displayed to the users who have not signed up yet.

If you want to use more properties, separate them with commas. For example:

// Send custom properties 
wisepops("properties", {
subscribed: '{{subscribed}}',
  country: '{{country}}',
  age: '{{age}}'


If the custom properties are not working as you expect, here is how you can verify the availability of the GTM variables for Wisepops:

1. Enable the GTM Preview mode:

2. Go to your website, on the page where you expect the GTM variables to be set as Wisepops custom properties.

3. Verify that the tag intended to set the custom properties is in the list of fired tags:

If not, you need to adjust the trigger of the tag.

4. Click on the tag.
Note the message where our tag is fired. In this example, the message is "3 DOM Ready".

Also note the GTM variable name that you want to verify. For this example we will focus on wordpressPageType (signaled by the arrow).

5. Click on the appropriate message in the left column, then open the "Variables" tab, and find your GTM variable in the list:

This shows you the value of your variable at the time when it has been transmitted to Wisepops. If it is undefined, it is likely that your variable is set too late. You can find when it is made available by selecting next messages in the left column. To fix this, you must ensure that your variable has been defined before firing the tag that sets the Wisepops custom properties.

Feel free to contact us if you need help.

Did this answer your question?