• Resolved 4yourcna

    (@4yourcna)


    Setting up with an affiliate ad company and am required to add the following tracking code to the body just above the /body tag. How do I do that? I cannot find the /body tag anywhere…I find the <body> in the header file…but the instructions are specific and I am unsure where to put the code since it is calling an ad and I’m not sure the call should come before content is served?
    This is what it says: Paste the VigLink code into your pages to start earning.
    The code should be inserted at the very end of your pages, just before the <\body> tag.
    The code needs to be present on every page where you need VigLink to work. The best way to install the code everywhere is to add it to your site’s template.

    
    <script type="text/javascript">
        var vglnk = {key: '5f26acebd362b62149181d0027cfaf99'};
        (function(d, t) {
            var s = d.createElement(t);
                s.type = 'text/javascript';
                s.async = true;
                s.src = '//cdn.viglink.com/api/vglnk.js';
            var r = d.getElementsByTagName(t)[0];
                r.parentNode.insertBefore(s, r);
        }(document, 'script'));
    </script>
    
    • This topic was modified 6 years, 3 months ago by Jose Castaneda.
    • This topic was modified 6 years, 3 months ago by Jose Castaneda. Reason: added backticks for code

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author oceanwp

    (@oceanwp)

    Hello, copy the footer.php file in your child theme, open it in your text editor and add the code before the closing body tag.
    Or even better you can use Ocean Hooks to add it to your pages.

    Thread Starter 4yourcna

    (@4yourcna)

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add ad code to body’ is closed to new replies.