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 TikTok Tracking 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();

        <!-- TikTok Pixel Code -->
        ttq.track('ViewContent', {
            content_name: product.getName(),
            content_category: product.getCategory(),
            content_ids: product.getProductSkus(),
            content_type: 'product',
            value: product.getPrice(),
            currency: product.getCurrencyCode()
        });
        <!-- End TikTok Pixel 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();
    
    <!-- TikTok Pixel Code -->
    ttq.track('AddToCart', {
        content_category: product.getCategory(),
        contents: product.getTikTokAddedToCartItems(),
        content_type: 'product',
        value: product.getAddedToCartTotal(),
        currency: product.getCurrencyCode()
    });
    <!-- End TikTok Pixel Code -->
});
</script>

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

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();
     
    <!-- TikTok Pixel Code -->
    ttq.track('InitiateCheckout', {
        contents: checkout.getTikTokItems(),
        content_type: 'product',
        currency: checkout.getCurrencyCode(),
        content_ids: checkout.getSkus(),
        value: checkout.getCartTotal(),
        num_items: checkout.getItemCount()
    });
    <!-- End TikTok Pixel Code -->
});
</script>
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();

        <!-- TikTok Pixel Code -->
        ttq.track('PlaceAnOrder', {
            contents: purchase.getTikTokItems(),
            content_type: 'product',
            currency: purchase.getCurrencyCode(),
            value: purchase.getOrderTotal(),
            num_ids: purchase.getItemCount()
        });
        <!-- End TikTok Pixel Code -->
    });
</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

Unlock the full potential of your Magento 2 store with MagePal extensions

Magento Enhanced E-commerce

If your are using Magento + Google Analytics, then you need Enhanced E-commerce for Google Tag Manager.

Enhanced Success Page

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

HTML Minifier for Magento2

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