Return to 'Set Up Wisp with Google Tag Manager'.

Wisp has the ability to build powerful audiences for your campaigns. To define an audience, you create rules for Wisp to follow. When people match those rules, they'll get the notification associated with that campaign.

One of the properties in Wisp you can use are called 'Custom Properties'. This is a chance for you to put your Google Tag Manager Variables to work. Using variables with custom properties is a great way to create personalized experiences for your visitors.

Here's how you do it.

1. Open the Tag you Created.

Return to your tags section on Google Tag Manager and open the tag you created for Wisp.

2. Prepare the Script.

Now you need to add a tiny bit of code to the script you already saved. Go ahead and copy this entire snippet:

, {
custom: {

}
}

Once that's copied, add it to the existing script. Paste it immediately after the final quotation mark on line 3 and before the closing script tag on line 4. The end result should look similar to this:

3. Provide Custom Variables.

In order to make this work, you need to add the Google Tag Manager variables that you want Wisp to pay attention to. That's how the custom variables are communicated so that you can build campaigns around them in the Wisp Admin.

The script will match the property label you use in Wisp with the variable used in Google Tag Manager. If you're setting this up, odds are you already know how this works and what to do, but just in case, here's the formatting you should follow:

wisp_property_name: {{gtm_variable}}

In the above example, wisp_property_name is the label you make up. This is what you'll declare in Wisp when you create the rule. More on this below.

The gtm_variable however must be one of your existing variables set up in Google Tag Manager. You can find your variables in the side-menu on the left or in the editor by pressing ctrl + space, but just typing {{ should make a list appear.

4. Save your Work!

Once you've added your variables, don't forget to save it!

5. Build your Audience.

To use your custom variable on Wisp, create or edit a custom campaign. Go to the audience step and select "Custom Property" the property selection box.

This is where you connect the dots. Fill the property input with the name of your variable, select an operator and add a value that makes sense for the rule and campaign you're about to run.

6. Wrap it Up.

Save and publish the campaign. Voila. You're now putting your Google Tag Manager variables to work, creating personalized commerce experiences.

Great work!

Did this answer your question?