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 Snapchat 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.

MagePal - Snapchat - All Page View
Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Pages

HTML

<script>
require(['DataLayerCustomerApi'], function (dataLayerCustomerApi) {
    var customer = dataLayerCustomerApi();
    
    var snapchatOptions = {};
    var email = '';
    
    if (email = customer.getEmail()) {
        snapchatOptions = {user_email: email};
    }
    
    (function(win, doc, sdk_url){
      if(win.snaptr) return;
      var tr=win.snaptr=function(){
      tr.handleRequest? tr.handleRequest.apply(tr, arguments):tr.queue.push(arguments);
    };
      tr.queue = [];
      var s='script';
      var new_script_section=doc.createElement(s);
      new_script_section.async=!0;
      new_script_section.src=sdk_url;
      var insert_pos=doc.getElementsByTagName(s)[0];
      insert_pos.parentNode.insertBefore(new_script_section, insert_pos);
    })(window, document, 'https://sc-static.net/scevent.min.js');
    
    snaptr('init','xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', snapchatOptions);
    snaptr('track','PAGE_VIEW');
});
</script>
MagePal - Snapchat - Product Page
Tag Configuration
Tag type : Custom Html

Trigger Configuration
Trigger: All Custom Events
Event Name: productPage
Advanced Settings:
 - Tag Sequencing
   - Fire a tag before 'MagePal - Snapchat - Product Page' fires
     - MagePal - Snapchat - All Page View

HTML

<script>
require(['DataLayerProductApi'], function (dataLayerProductApi) {
    var product = dataLayerProductApi();
    
    snaptr('track', 'VIEW_CONTENT', {
        'currency': product.getCurrencyCode(),
        'item_ids': product.getProductSkus()
    });
});
</script>
MagePal - Snapchat - 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();
    
    snaptr('track', 'ADD_CART', {
        'currency': product.getCurrencyCode(),
        'item_ids': product.getAddedToCartItemSkus()
    });
});
</script>

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

MagePal - Snapchat - Initiate Checkout
Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Custom Events
  Event Name : checkoutPage

HTML

<script>
require(['DataLayerCheckoutApi'], function (dataLayerCheckoutApi) {
    var checkout = dataLayerCheckoutApi();
     
    snaptr('track', 'START_CHECKOUT', {
        'currency': checkout.getCurrencyCode(),
        'item_ids': checkout.getSkus(),
        'number_items': checkout.getItemCount()
    });
});
</script>
MagePal - Snapchat - 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();
    
    snaptr('track', 'PURCHASE', {
        'currency': purchase.getCurrencyCode(),
        'price': purchase.getOrderTotal(),
        'transaction_id': purchase.getOrderId(),
        'item_ids': purchase.getSkus(),
        'number_items': purchase.getItemCount()
    });
});
</script>
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.

Order Shipment Tracking

Providing your customer with a beautiful and functional order package tracking without leaving your site.

Enhanced Success Page

Add cross-sell, upsell, related products, social media links and other elements to your order confirmation.

Catalog Hover Image for Magento

Quickly previewing alternative product images on your category list page.