Google GTM Guide

To implement GTM, you need to do 2 main steps:

I. Add Spindl SDK as a Tag

  1. In Your Tags Section, click New

  2. In Tag Configuration, select Custom Html

  1. Paste in Spindl Script below with the unique SDK Key that we provide to you. This code does 3 things:

  • Installs spindl script

  • Enables auto Page View events

  • Enables auto Wallet Connect events

    • (we can only collect Wallet Connect events automatically for Metamask chrome extension. If you want to also capture Coinbase, OKX and other types wallets, then contact us & we will help set you up)

<script src="https://cdn.spindl.xyz/attribution-1-6-1.js"></script>

<script>
 window.spindl.configure({
   sdkKey: "<Your SDK Key Here>" // use your personal SDK key here
  });
  
  window.spindl.enableAutoPageViews();
  window.spindl.enableAutoWalletConnects();
  
</script>
  1. For Triggering, choose Initialization - All Pages

  1. Click Save and don't forget to Submit the changes at the top right once you're ready.

Once submitted, you should shortly see Page View and Wallet Connect events in your Spindl Dashboard under the Data tab

II. Track Custom Events

Now that the Spindl SDK has been instantiated and some events are flowing, you may want to track important custom events. These could be anything from button clicks to form submissions, navigation to specific areas, purchases, etc. To set this up, we need to follow 3 steps:

  1. Configure your Triggers:

  • There are many ways to configure these that are outside the scope of Spindl. Feel free to watch some tutorials on YouTube to familiarize yourself with options if you're new to this

  1. Add Spindl Tag Template:

  • Go to Templates section and in Tag Templates section click on Search Gallery

    • Find & Select Spindl Tag Template

  1. Configure Your Triggers & Tags:

  • Go to the Tags Section and click on New to create a new Tag

  • In Tag Configuration select Spindl Tag Template that you added in step 2.

  • Add the Event Name that you want to show up in the attribution

    • Event Type is by default Custom. We may add more options here in the future

  • In Triggering, pick the triggers that you configured in Step 1 and click Save. You can Preview the changes (button in top right) before you submit the Workspace Changes.

    • After 10-20 seconds you should start seeing Custom events in the Spindl Data tab

Last updated