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 CJ Affiliate 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.

All Page View

Set cookie if user is coming from a CJ Affiliate (site.com/?cjevent=abc123)

Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Pages


require(['DataLayerApi'], function (dataLayerApi) {
    var dataHelper = dataLayerApi();
    <!-- CJ Affiliate Code -->
    <!-- CJ Affiliate Code -->
Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Custom Events
  Event Name : purchase


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

    var queryParms = {
        containerTagId: 'Add your Container Tag Id here',
        OID: purchase.getOrderId(),
        TYPE: 'Add your Type Id here',
        CURRENCY: purchase.getCurrencyCode(),
        DISCOUNT: purchase.getOrder('discount'),
        COUPON: purchase.getOrderCouponCode(),
        CJEVENT: purchase.getTrackingCodeIfKeyExist('cjevent', true)
    var cjFormat = {
        renameFieldTo: {id:'ITEM', quantity:'QTY', price:'AMT'},
        appendIndex: true
    var cjItems = purchase.getItems(cjFormat);
    var url = purchase.buildUrl();

Total Downloads


years experience with Magento


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 Extensions

Take your online store to the next level with MagePal Magento 2 extensions - More features, More sales, More success.

Order Shipment Tracking

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

DataLayer for Tag Manager

Whether you are integrating Bing, Facebook, SnapChat, Pinterest, or any other services our extension make it easy.

Enhanced Success Page

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