Setup Pinterest Conversion Tracking for Shopify Add to Cart
Published on Jul 18, 2024
Are you looking to boost your e-commerce performance by tracking Pinterest conversions on your Shopify store? One crucial event you’ll want to monitor is the “Add to Cart” action. This blog post will guide you through the process of setting up Pinterest conversion tracking for Add to Cart events in Shopify, with a focus on various themes and potential challenges you might encounter.
Understanding Pinterest Conversion Tracking
Before diving into the implementation, let’s briefly discuss why Pinterest conversion tracking is important for your Shopify store.
The Importance of Conversion Tracking
Conversion tracking allows you to measure the effectiveness of your Pinterest marketing efforts. By tracking specific events like Add to Cart, you can:
- Understand user behavior on your site
- Optimize your Pinterest ad campaigns
- Improve your return on investment (ROI)
Types of Pinterest Conversion Events
Pinterest offers several conversion events you can track, including:
- Page visits
- Add to Cart
- Checkout
- Purchase
In this guide, we’ll focus specifically on implementing the Add to Cart event.
Implementing Pinterest Conversion Tracking
To set up Pinterest conversion tracking for Add to Cart events, you’ll need to add some code to your Shopify theme. The process can vary depending on your theme, so we’ll cover a few common scenarios.
General Implementation Steps
- Add the Pinterest base tag to your theme.liquid file
- Implement the Checkout Event in your checkout settings
- Add the Add to Cart event code to your product template
Brooklyn Theme Implementation
If you’re using the Brooklyn theme, follow these steps to add the Add to Cart event code:
- Go to Online Store > Themes > Edit code
- Open the sections/product-template.liquid file
- Locate the submit button (around line 311)
- Add the onclick attribute to the button
Here’s an example of how the code should look:
<button type="submit" name="add" id="AddToCart--{{ section.id }}"
class="{{ btn_class }}"
{% if section.settings.enable_payment_button and product.selling_plan_groups == empty %}{{ form | payment_button }}{% endif %}
onclick="pintrk('track', 'addtocart');">
<span id="AddToCartText--{{ section.id }}">{{ 'products.product.add_to_cart' | t }}</span>
</button>
This implementation is the most likely solution for Brooklyn theme users.
Other Theme Implementations
Different themes may require slightly different approaches. Here are some tips for other popular Shopify themes:
Minimal Theme
For the Minimal theme, you may need to look in the product-form.liquid file within the Snippets section. Search for the Add to Cart button and add the onclick attribute as shown in the Brooklyn theme example.
Narrative Theme
Narrative theme users should check the product-template.liquid file. If you can’t find the Add to Cart button there, look for any references to other product-related liquid files.
Prestige Theme
For the Prestige theme, you might need to search for the addtocart function in the product.liquid file. If it’s not there, check other product-related files in your theme.
Troubleshooting Common Issues
Even after following the implementation steps, you might encounter some issues. Here are some common problems and potential solutions:
Can’t Find the Add to Cart Button
If you’re having trouble locating the Add to Cart button in your theme files:
- Check all product-related liquid files (e.g., product-template.liquid, product-form.liquid)
- Use the search function in your theme editor to look for keywords like “addtocart” or “add to cart”
- Consult your theme’s documentation or reach out to the theme developer for guidance
Errors After Implementation
If you’re seeing errors after adding the Pinterest code:
- Ensure the code is placed correctly within the button tag
- Check for any syntax errors or missing quotation marks
- Verify that the Pinterest base tag is properly implemented in your theme.liquid file
Tag Health Issues
If Pinterest reports that your tag is unhealthy:
- Double-check that all required events (including Checkout) are implemented correctly
- Ensure that the enhanced match parameters are properly set up
- Use Pinterest’s tag helper tool to diagnose and resolve any issues
Best Practices for Pinterest Conversion Tracking
To get the most out of your Pinterest conversion tracking, consider these best practices:
Regular Monitoring
- Check your Pinterest analytics regularly to ensure events are firing correctly
- Monitor your tag health in the Pinterest Ads Manager
- Stay updated on any changes to Pinterest’s tracking requirements
Testing and Validation
- Use Pinterest’s tag helper tool to validate your implementation
- Perform test transactions on your store to ensure events are tracked accurately
- Compare Pinterest data with your Shopify analytics to identify any discrepancies
Optimization
- Use the tracked data to optimize your Pinterest ad campaigns
- Experiment with different ad formats and targeting options based on your conversion data
- Regularly update your product feed to ensure accurate information is being shared with Pinterest
By following these guidelines and implementing Pinterest conversion tracking for Add to Cart events, you’ll be well on your way to improving your Shopify store’s performance on Pinterest. Remember that each theme may require a slightly different approach, so don’t hesitate to consult theme documentation or reach out to support if you encounter any difficulties.
Take Our Quick Quiz:
Which primary product image do you think has the highest conversion rate?