Setup Pinterest Conversion Tracking for Shopify Add to Cart

Published on Jul 18, 2024

By Aisha Patel

#E-commerce#Shopify#Digital Marketing
Silver Shopping Cart on Pink Surface

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:

  1. Understand user behavior on your site
  2. Optimize your Pinterest ad campaigns
  3. Improve your return on investment (ROI)

Types of Pinterest Conversion Events

Pinterest offers several conversion events you can track, including:

  1. Page visits
  2. Add to Cart
  3. Checkout
  4. 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

  1. Add the Pinterest base tag to your theme.liquid file
  2. Implement the Checkout Event in your checkout settings
  3. 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:

  1. Go to Online Store > Themes > Edit code
  2. Open the sections/product-template.liquid file
  3. Locate the submit button (around line 311)
  4. 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:

  1. Check all product-related liquid files (e.g., product-template.liquid, product-form.liquid)
  2. Use the search function in your theme editor to look for keywords like “addtocart” or “add to cart”
  3. 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:

  1. Ensure the code is placed correctly within the button tag
  2. Check for any syntax errors or missing quotation marks
  3. 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:

  1. Double-check that all required events (including Checkout) are implemented correctly
  2. Ensure that the enhanced match parameters are properly set up
  3. 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

  1. Check your Pinterest analytics regularly to ensure events are firing correctly
  2. Monitor your tag health in the Pinterest Ads Manager
  3. Stay updated on any changes to Pinterest’s tracking requirements

Testing and Validation

  1. Use Pinterest’s tag helper tool to validate your implementation
  2. Perform test transactions on your store to ensure events are tracked accurately
  3. Compare Pinterest data with your Shopify analytics to identify any discrepancies

Optimization

  1. Use the tracked data to optimize your Pinterest ad campaigns
  2. Experiment with different ad formats and targeting options based on your conversion data
  3. 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?