How to Add the Reddit Pixel to Google Tag Manager
Looking to get started with Reddit advertising for your website? You’ll want to track conversions to measure your performance. As the famous saying by Peter Drucker goes: “what gets measured gets managed”.
How Do You Set Up Tracking for Reddit Ad Conversions?
To track conversions from your Reddit ads, you’ll want to add the Reddit Pixel to your website. By the end of this article, you'll have a working Reddit Pixel to help track conversions and visits to your website from Reddit ads.
Pixels are small snippets of code that are placed on websites to gather information about website visitors and track actions on your website. Source
Before Beginning
Before getting started, make sure you have the following:
- A Reddit account and a Reddit Ads account
- A Google Tag Manager container set up on your website
Overview
- Here’s what we will be creating in your Google Tag Manager container:
- A new Tag for the Reddit Pixel
- A new Trigger for firing our event to the Reddit Pixel
- A new Variable to use in the Trigger condition
Add Reddit Pixel Template
-
In Google Tag Manager, select your container name
-
Select Templates and under Tag Templates, click "Search Gallery"
-
Click the search icon in the corner and search for "Reddit"
-
Select the Reddit Pixel template and click "Add to workspace"
-
You'll get a warning message about using a community template but you can click "Add" to accept the permissions
After completing the above steps, you'll have the Reddit Pixel added to your Tag Templates!
Create a New Tag for the Reddit Pixel Template
-
Go to Tags and Select "New"
-
Click on the pencil icon under Tag Configuration and scroll down to the "Custom" category to find the Reddit Pixel we added in the above section.
-
In the tag configuration, fill in the following fields:
-
Pixel ID: You can find that in the Reddit Ads Events Manager
-
Event to Fire: For this example, I’ll set it to Page View, but just know that Reddit has many other events you can track. My goal here is to see how many people view my website from my Reddit ad campaign.
-
Conversion ID: You can leave this blank.
-
-
Now that our Tag configuration is complete, we are going to create a Trigger that will send the event "Page Visit" to Reddit. In the Trigger Configuration box (located below the Tag Configuration section), click within the section (or the pencil icon) to open up the Trigger configuration menu.
-
To create a new trigger, click the plus icon in the top right-hand corner.
-
Click on the pencil icon in the Trigger Configuration box, and select "Page View" as the Trigger type.
-
Change the value of "this trigger fires on" radio input to have "Some Page Views" selected.
Note: We are doing this because we do not want to fire a conversion event to Reddit every time someone views our page because this would include anyone viewing the page, and not just people from Reddit.
-
For the value of "Fire this trigger when an Event occurs and all of these conditions are true", we will change the default value of "Page Hostname" to "New Variable". This will open a new window where we will add our new Variable in the next section.
Adding a New Variable for Checking Traffic Source
-
Click the pencil icon under Variable Configuration
-
For the value of "Variable Type", select "URL"
-
For the value of "Component Type", select "Query"
The case I found that worked best was only firing a Page View event to Reddit when the query parameter
utm_source
equalsreddit
. Feel free to tweak the variable to your preferred method, but make sure you don’t fire the event on every page view, only the ones that come from Reddit. Don’t forget when you set up your Reddit campaign, you use a URL that includes these parameters. -
Set the value for query key to "utm_source"
-
Don't forget to name and save your variable!
-
Back on the Trigger screen, set the value of "Fire this trigger when an Event occurs and all of these conditions are true" to be Name of your Variable equals "reddit".
-
Name and save your trigger
-
Finally, name and save your tag
To recap, we set up a Trigger that will fire the Page View event to Reddit when someone comes to our website only if the URL contains the query key and value: utm_source=reddit
Validate your Google Tag Manager Changes
Give yourself a pat on the back because we've added all the required components to start tracking data from Reddit! But we aren't quite done yet. Now is a good idea to test our configuration to make sure everything works. And how to be we test this? Lucky for us, Google Tag Manager gives us an easy way to preview changes before publishing them to your live website.
-
Within your Google Tag Manager workspace, click on the "Preview" button.
-
Type in your website's address and make sure to add
?utm_source=reddit
to the end of the address For instance, it should looks like:yourdomain.com?utm_source=reddit
. Now click Connect to start the preview session. -
Once your webpage loads, you should see that your Reddit Pixel was fired 1 time.
-
One last thing to verify is the conversion event also shows up in Reddit. Go back to Reddit Ads and under Event Manager, find the Conversion Events menu item.
Publish Your Google Tag Manager Workspace Changes
Once everything is working and you are able to see both the Reddit Pixel tag fired through Google Tag Manager and see the conversion event listed within Reddit, you are good to publish your workspace changes! If you forget this step, you might find yourself scratching your head wondering why no events are showing up on your live site. So definitely don't forget to hit Publish!
Wrap Up
Congratulations on getting your Reddit Pixel set up on your website! You are now ready to launch your Reddit Ads campaign!
Here's a recap of what we did:
- We set up a new Tag in Google Tag Manager for the Reddit Pixel
- We set a Variable for the URL query key of "utm_source"
- We defined a Trigger to fire the "Page Visit" event to the Reddit Pixel only when the URL contains the query key and value are
utm_source=reddit
- We tested our configuration with the Google Tag Manager Tag Assistant feature