Implementing the Pinterest tag with Google Tag Manager (GTM) allows you to track conversions, website interactions, and audience insights from Pinterest traffic effectively. The Pinterest tag is a JavaScript code snippet that tracks user actions on your site, providing valuable data for optimizing your Pinterest ad campaigns. Below, I’ll explain the step-by-step process to implement the Pinterest tag via GTM.
1. Understand the Pinterest Tag
The Pinterest tag is a JavaScript code snippet provided by Pinterest Ads Manager. It tracks key user actions, such as page visits, signups, or purchases. These actions, called Standard Events, include:
- PageVisit: Tracks when a user visits a page.
- AddToCart: Tracks when a user adds an item to their cart.
- Checkout: Tracks when a user completes a purchase.
- Signup: Tracks when a user signs up on your site.
The tag consists of a base code (always required) and optional event codes (specific to user interactions).
2. Prerequisites
Before proceeding, ensure the following:
- Pinterest Business Account: You need a Pinterest Business account to access the Pinterest Ads Manager.
- Google Tag Manager Account: Your GTM container should already be set up on your website.
- Website Access: You need access to your website’s GTM container to make updates.
- Pinterest Tag ID: This ID is unique to your account and available in the Pinterest Ads Manager.
3. Retrieve Your Pinterest Tag ID
- Log in to your Pinterest Ads Manager.
- Navigate to Ads > Conversions > Pinterest Tag.
- Copy your unique Pinterest Tag ID. This ID will be used in GTM configuration.
4. Set Up the Pinterest Base Code in GTM
The base code is the core part of the Pinterest tag, responsible for initializing tracking on your site.
Step 1: Create a New Tag in GTM
- Log in to your GTM account and open your website container.
- Go to the Tags section and click New.
- Name your tag (e.g., “Pinterest Base Code”).
Step 2: Configure the Tag
- In the Tag Configuration panel, select Custom HTML.
- Paste the following Pinterest base code:
- Replace
'YOUR_TAG_ID'
with your Pinterest Tag ID. - The
{em: '<user_email_address>'}
parameter is optional for tracking email addresses in hashed form for better audience matching.
Step 3: Add a Trigger
- Under Triggering, click Add Trigger and select All Pages.
- This ensures the base code loads on every page of your site.
Step 4: Save and Publish
- Click Save to save the tag.
- Submit and publish the container to push the changes live.
5. Add Standard Event Tags
To track specific user actions, set up additional tags for Pinterest’s standard events. Let’s use AddToCart as an example.
Step 1: Create a New Tag
- Go to the Tags section in GTM and click New.
- Name your tag (e.g., “Pinterest AddToCart Event”).
Step 2: Configure the Tag
- In the Tag Configuration panel, select Custom HTML.
- Paste the event tracking code:
- Replace the
value
andcurrency
with appropriate values for your site.
Step 3: Add a Trigger
- Under Triggering, click Add Trigger.
- Create a new trigger for the specific event you want to track. For example:
- Trigger Type: Choose Click – All Elements or Form Submission, depending on the event.
- Conditions: Configure conditions to fire the tag only when a user adds an item to their cart.
Step 4: Save and Publish
- Click Save to save the tag.
- Submit and publish the container.
6. Test the Pinterest Tag
It’s crucial to verify that your Pinterest tag is working correctly before relying on it for data.
Step 1: Use GTM Preview Mode
- In GTM, click Preview to enable Debug mode.
- Open your website in a new tab to test the tag.
Step 2: Check Tag Firing
- Perform actions on your site, such as visiting a page or adding an item to your cart.
- Ensure the Pinterest tag fires as expected by checking the GTM Debug Console.
Step 3: Use Pinterest Tag Helper
- Install the Pinterest Tag Helper browser extension.
- Open your website and check if the tag and events are firing correctly.
7. Optimize and Maintain
Once the Pinterest tag is live, monitor its performance in Pinterest Ads Manager and make adjustments as needed:
- Track Conversions: Use Ads Manager to review conversion data and audience insights.
- Refine Events: Add more event tags or refine triggers to better track key user actions.
- Monitor Performance: Regularly test and update the tag to ensure compatibility with site updates.
Conclusion
Implementing the Pinterest tag using Google Tag Manager is a straightforward process that enhances your ability to track and optimize Pinterest-driven traffic. By setting up the base code and configuring standard events, you can gain valuable insights into user behavior and drive more effective Pinterest campaigns. Proper testing and maintenance ensure accurate data collection, enabling better decisions for your advertising strategy.