1. Help Center
  2. Frequently Asked Questions

Can I use Google Tag Manager to Deploy Anura Script?

Here at Anura we completely understand that clients may wish to use Google Tag Manager (GTM).  Having the ability to embed our code across all desired sites once is a great benefit.

**Anura has a plugin feature for GTM, you can access the plugin here:**


If you do not have a GTM account, here is Google’s link to create an account: https://support.google.com/tagmanager/answer/6103696?hl=en

Key Limitations to a GTM/Anura Deployment:

  1. Clients must use GTM’s full script. Google’s truncated one-line tag will not pass the necessary data to Anura for analysis.
  2. Please note that most ad blockers will prevent GTM from running. This will prevent Anura’s visitor analysis, since it is reliant of GTM to embed Anura’s code.

To start:

The GTM Tag can be customized to pass variables specific to client’s individual needs.

Ensure the variables you wish to pass to Anura are established within your GTM account.

Please see the following tutorial on how to establish a user defined variable within GTM.


Anura allows for two variables to be passed, one under the name SOURCE and the other under the name CAMPAIGN. 

Best practices dictate SOURCE should be used to list where the traffic is coming from, and CAMPAIGN should list where that traffic is going to.

When building a tag for Anura:

  • Pass the variable used to identify where your traffic is coming in from under source.
  • Pass the variable used to track where your traffic is going to under campaign.

GTM tag for Anura

NOTE: Highlighted in BOLD text are locations where custom input is REQUIRED.

  • Instance: Be sure to insert your assigned instance ID
  • Source: insert your designated variable for incoming traffic
  • Campaign: insert your designated variable for where that traffic goes to.
<script type="text/javascript">


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

    if ('object' === typeof anura) {

        var params = [];

        var request = {

            instance: yourAssignedInstanceId,

            source: encodeURIComponent({{Variable used to identify incoming traffic}}),

            campaign: encodeURIComponent({{Variable used to where traffic is sent}}),

            // exid: encodeURIComponent('optionalUniqueExternalId'),

            // variable: encodeURIComponent('optionalResponseObjectVariable'),

            // callback: encodeURIComponent('optionalCallbackFunction')


        for (var x in request) params.push(x+'='+request[x]);


        anura.type = 'text/javascript';

        anura.async = true;

        anura.src = 'https://script.anura.io/request.js?'+params.join('&');

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

        script.parentNode.insertBefore(anura, script);




Please contact Support at support@anurio.io with any questions or assistance with custom variable configuration.