Integrating with Shopify

  1. In your shop’s admin environment, go to: Sales Channels > Online Store > Themes > Click on actions > Edit Code
  2. Select the theme.liquid file in the layouts folder. Add the following code, just before the </head> tag.

    <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
    <script type="text/javascript">
        (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
        (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
    
        tap('create', '((((YOUR ACCOUNT ID))))');
        tap('detect');
    </script>
    

    {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

  3. Hit save

  4. Next, in your shops admin environment, go to:  Settings > Checkout > Scroll down to the option Order processing and keep scrolling until you see the box Additional scripts
    In the additional scripts box, paste in the following code:

    {% if first_time_accessed %}
    <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
    <script type="text/javascript">
        (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
        (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
    
        tap('create', '((((YOUR ACCOUNT ID))))');
        tap('conversion', '{{ order_number }}', {{ subtotal_price | money_without_currency | replace: ',', '.' }}, {
            coupons: {{ order.discounts | map: 'code' | json }}
        });
    </script>
    {% endif %} 
    

    {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

  5. Hit save and you are all done!

Important

Please remember to test a conversion before starting your program. This way you can verify that tracking has been set up correctly. You can create a test conversion by following the steps described here.

Start a 14-day free trial with all our features enabled

Start now