Push the limits of your Adobe Commerce store with MagePal Extension

Take your Adobe Commerce store to new heights with the power of MagePal extensions. Our expertly crafted code and rigorous testing ensure seamless integration with Adobe Commerce, giving you the freedom to focus on growing your business, not debugging. Upgrade your store's potential with MagePal.

Integrate Pinterest Conversion Pixel with Google Tag Manager

Please Note: The settings below require our Datalayer for Google Tag Manager for Magento and some features also require our Enhanced Ecommerce or Google Analytics 4 extensions.

Product Page View
Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Custom Events
  Event Name : productPage

HTML

<script>
require(['DataLayerProductApi'], function (dataLayerProductApi) {
    var product = dataLayerProductApi();
    
    <!-- Pinterest Conversion Tag Code -->
    pintrk('track', 'PageVisit', {
        currency: product.getCurrencyCode(),
        product_id: product.getProductSkus()
    });
    <!-- End Pinterest Conversion Tag Code -->
});
</script>
Add To Cart
Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Custom Events
  Event Name : addToCart

HTML

<script>
require(['DataLayerProductApi'], function (dataLayerProductApi) {
    var product = dataLayerProductApi();
    
    <!-- Pinterest Conversion Tag Code -->      
    pintrk('track', 'AddToCart', {
        value: product.getAddedToCartTotal(),
        order_quantity: product.getAddedToCartQty(),
        currency: product.getCurrencyCode(),
        product_id: product.getAddedToCartItemSkus()
    });
    <!-- End Pinterest Conversion Tag Code -->
});
</script>

*Enhanced Ecommerce and/or Ga4 extension required for this functionality.

Purchase
Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Custom Events
  Event Name : purchase

HTML

<script>
require(['DataLayerPurchaseApi'], function (dataLayerPurchaseApi) {
    var purchase = dataLayerPurchaseApi();

    <!-- Pinterest Conversion Tag Code -->
    pintrk('track', 'checkout', {
        value: purchase.getOrderTotal(),
        order_quantity: purchase.getItemCount(),
        currency: purchase.getCurrencyCode(),
        line_items: purchase.getPinterestItems()
    });
    <!-- End Pinterest Conversion Tag Code -->
});
</script>

FAQs

Q: How to check if my base code and event codes are firing after adding to my site?

A: ​Your base code is correctly implemented if the tag shows a ‘verified’ status in the conversion manager. Click into your Pinterest Conversion Tag to check that your event codes are firing - you’ll see a dashboard on the right for Tag Event History. Here you can see all the events that have fired with your Pinterest Conversion Tag. You can check when Pinterest last saw the event fire, and how many raw pixels fired for the event in the past 24 hours.

Q: Do I still need to add the base code, on pages where I want to track an event?

A: ​Yes. You need base code on every page where event code is added. On pages where you want to track conversions you should have two tags, the base code and the event code. See section 4 for examples of base plus event code. Keep in mind your base code must run first before the event code runs.

0

Total Downloads

11

years experience with Magento

30+

Magento / Adobe Commerce Extensions

Shop with confidence

With millions of downloads worldwide, install with confidence knowing that our extensions will just work.

Learn More About MagePal Extension

Is your Magento store ready for the future? Say hello to the new Google Analytics 4, which is built from the ground up with all-new features and advanced machine learning technology.

GA4 Extension

Related

Related Extensions

Streamline your e-commerce operations and boost your sales with MagePal Magento 2 extensions.

Enhanced Transactional Emails

Get more from your order confirmation emails by promoting other complementary products.

HTML Minifier for Magento2

Minification is the process of removing all unnecessary characters and spacing from your source code without changing its functionality.

Catalog Hover Image for Magento

Quickly previewing alternative product images on your category list page.