Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #780185

    Hi,

    I need to add a script to every page of my site to track visitor behavior for my email marketing provider (Drip).

    How do I go about that?

    Where do I add the script? Is there somewhere where I place the snippet once and it’s detected on every page?

    Maybe in the Google Analytics Code field within Enfold Theme Options? I have the Goolge tracking code and the remarketing code there already, not sure if it’s the right place and if so, where should I add it.

    Thanks

    #780187

    Hey Antonio,

    You can add it into header.php right before the tag, or into the Google Analytics field.

    Best regards,
    Jordan Shannon

    #780189

    Thanks for the prompt reply Jordan! Much appreciated.

    I can add it in the Google Analytics field, since that won’t be overwritten like the headr.php file when Enfold updates, right?

    Also, I already have a GA code within the Google Analyics field. It won’t affect anything if I add the other code underneath, right?

    #780198

    Hi,

    The GA field is not overwritten by updates and you can add them both within thatfield. There shouldn’t be an issue, but make sure to double check the GA dashboard to make sure that it is being recognized.

    Best regards,
    Jordan Shannon

    #780201

    thank you so much! Much appreciated :)

    #780206

    Hi,

    No problem at all. If you need additional help, let us know here in the forums.

    Best regards,
    Jordan Shannon

    #818504

    Hello All,

    I am adding drip to my website, and just found this post in the forums. Drip asks me to add the code to every page. Do I just need to add it once in the google analytics pane?

    Their instructions: “Install the following snippet of Javascript on every page of your website right before the closing </body> tag. You should include this code even on pages where you aren’t displaying any Drip forms so that we can accurately track visitor stats for you.”

    I have it as below – I have pasted the drip code (starting with <! …) beneath the google analytics code (UA-80491109-1) in the pane – is this right?

    Thanks,

    LW

    UA-80491109-1

    <!– Drip –>
    <script type=”text/javascript”>
    var _dcq = _dcq || [];
    var _dcs = _dcs || {};
    _dcs.account = ‘5944406’;

    (function() {
    var dc = document.createElement(‘script’);
    dc.type = ‘text/javascript’; dc.async = true;
    dc.src = ‘//tag.getdrip.com/5944406.js’;
    var s = document.getElementsByTagName(‘script’)[0];
    s.parentNode.insertBefore(dc, s);
    })();
    </script>

    • This reply was modified 7 years, 4 months ago by Lknows.
    #818542

    Hi,

    Please try this in your child theme functions.php file:

    function brilliantl_add_drip(){ ?>
    <script type=”text/javascript”>
    var _dcq = _dcq || [];
    var _dcs = _dcs || {};
    _dcs.account = ‘5944406’;
    
    (function() {
    var dc = document.createElement(‘script’);
    dc.type = ‘text/javascript’; dc.async = true;
    dc.src = ‘//tag.getdrip.com/5944406.js’;
    var s = document.getElementsByTagName(‘script’)[0];
    s.parentNode.insertBefore(dc, s);
    })();
    </script>
    <?php }
    add_action('wp_footer', 'brilliantl_add_drip');

    Best regards,
    Rikard

    #818876

    Hi Rikard,

    Thank you!

    I have figured out that there’s no need to paste in the code -that Drip has a plugin. I downloaded it and it seems to be working fine. Thank you.

    Yours,

    L

    #818900

    Hi,

    We’re glad you got that sorted out! :)

    Do you still need help with this topic, or can we close this thread?

    Best regards,
    Sarah

    #818938

    Yes – please close. Thank you.

    L

    #818967

    Hi,

    I’m glad you were able to get this figured out. If you need addtional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘where can I add a script to track visitor behaviors for email marketing?’ is closed to new replies.