Submit a Ticket My Tickets
Welcome
Login  Sign up

How to Track Conversions in CAKE From Your Shopify Account

This article will cover:




How to Track Sessions with the CAKE Dynamic Click Pixel

You can track a user’s session on your Shopify site via a CAKE Tracking Link or a CAKE Direct Link.


The CAKE Dynamic Click Pixel allows you to track users arriving to your landing page via a CAKE Direct Link. The Dynamic Click Pixel, or DCP, will attribute a session to the corresponding Campaign in CAKE.


To implement the CAKE DCP within Shopify, follow these steps:

  1. Click on the Online Store tab in your Shopify Dashboard

  2. Click on Themes

  3. Click on Customize

  4. Click on Theme actions

  5. Click Edit code

  6. Click on Theme.liquid. This is considered the master theme for your site and will allow you to track users across your entire website. 

  7. Paste your CAKE DCP into the body tag of the code.


Note:

Landing pages load top to bottom. If there are important elements of your page that need to load immediately, we would recommend placing the CAKE DCP after these elements, or at the bottom of the body tag.



How to Implement the CAKE JavaScript SDK Conversion Pixel on Order Checkout

Once a user has completed the checkout process, a conversion can be tracked within CAKE. To accomplish this, you will need to implement the CAKE JavaScript SDK Conversion Pixel within Shopify


To integrate the CAKE JavaScript SDK, follow these steps:

  1. Click on Settings in the Shopify Dashboard

  2. Click on Checkout

  3. Scroll down to the Order Processing section

  4. Paste the JavaScript SDK into the Additional Scripts text box



How to Configure the CAKE Javascript SDK Conversion Pixel with Shopify Liquid Tags

For conversion tracking, Shopify leverages Liquid Tags to insert dynamic values into a conversion pixel that can be tracked in CAKE.


The most common values that you will pass on the conversion pixel are the order total and the unique order ID of the transaction.


Below are the recommended Liquid Tags:

  • Order Total: {{total_price|money_without_currency}}

  • Order ID: {{order_number}}


The Shopify Liquid Tags must be paired with the correct parameters on the CAKE JavaScript SDK Conversion Pixel.


Example JavaScript SDK Conversion Pixel configured with Order Total and Order ID Liquid Tags:

<script type='text/javascript'>

    (_ckm = window._ckm || []).push(function cfgev() {

        CKMLib.configureEvents({

            domain: 'https://cs1trk.cakemarketing.com',

            offer_id: 54,

            event_id: 17

            revenue: {{total_price|money_without_currency}}

            transaction_id: {{order_number}}

        });

        CKMLib.fireEvent();

    });

    if (typeof CKMLib != 'string') {

        CKMLib = 'loading';

        var pix = document.createElement('script');

        pix.type = 'text/javascript';

        pix.async = true;

        pix.src = '//cakecdn.com/jssdk/lib.js';

        var s = document.getElementsByTagName('script')[0];

        s.parentNode.insertBefore(pix, s);

    }

</script>


Note:

Passing revenue in the pixel will override the revenue set on the Offer in CAKE in the Price Received field. If you do not want to override the revenue set in CAKE, omit the “Revenue” parameter from the pixel.



FAQ

Do I have to use the CAKE Dynamic Click Pixel?

    No, it is not required to use the CAKE Dynamic Click Pixel if you are tracking users via a CAKE tracking link. However, some traffic sources like Google, do not support tracking links. In these scenarios, you must use the CAKE Direct Link.


Does CAKE support Shopify product values, like SKU?

    No, CAKE does not currently support product level details on the CAKE Conversion Pixel.



You may also be interested in:

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.