Results 1 to 3 of 3
Like Tree2Likes
  • 2 Post By talent

Thread: How to Add Tracking Code to Just Before the </body> tag

  1. #1
    Thread Starter
    hassledhoff's Avatar
    Join Date
    Apr 2011
    Location
    United States
    Posts
    30
    Thanks
    6
    Thanked 0 Times in 0 Posts

    How to Add Tracking Code to Just Before the </body> tag

    I would like to add visitor measuring code to my ClassiPress website that I've obtained from Quantcast. (https://www.quantcast.com)

    Quantcast instructions state that the code needs to be placed just before the </body> tag and any other measurement tags. See code below.

    <!-- Quantcast Tag -->
    <script type="text/javascript">
    var _qevents = _qevents || [];

    (function() {
    var elem = document.createElement('script');
    elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js";
    elem.async = true;
    elem.type = "text/javascript";
    var scpt = document.getElementsByTagName('script')[0];
    scpt.parentNode.insertBefore(elem, scpt);
    })();

    _qevents.push({
    qacct:"p-8Zxe9uotvM7CT"
    });
    </script>

    <noscript>
    <div style="display:none;">
    <img src="//pixel.quantserve.com/pixel/p-8Zpe9ncrvJ7CV.gif" border="0" height="1" width="1" alt="Quantcast"/>
    </div>
    </noscript>
    <!-- End Quantcast tag -->

    I've been trying to figure out how and where to add the code. As best as I've been able to discern the code is either added to the theme-footer.php file or the Footer file. Also it seems that the code needs to be added as a "hook".

    I'm not sure what a "hook" is, how to write a "hook" for this code and where to place the "hook".

    Any assistance would be appreciated.

    Thank you.

  2. #2
    talent's Avatar
    Join Date
    Jul 2011
    Location
    United Kingdom
    Posts
    3,486
    Thanks
    74
    Thanked 549 Times in 497 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    xavier and auction81 like this.
    $function ('CUSTOMIZATION'); } else { .DESIGN { display: awesome; }
    If you require any additional functionality or design customization, just ask. Afterall... anything is possible! However, I may not know how to implement your particular request, but if you don't ask, you don't get

    If you build it, they will come...


  3. #3
    Expired Customer xavier's Avatar
    Join Date
    May 2015
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Google tracking code
    By tbase in forum Vantage General Discussion (Legacy)
    Replies: 3
    Last Post: November 21st, 2012, 11:17 PM
  2. [SOLVED] Error in new version - some weird code at opening body ??
    By veloso in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: April 19th, 2012, 07:05 PM
  3. Indeed Attribution & Click Tracking code
    By tbase in forum JobRoller General Discussion
    Replies: 1
    Last Post: March 27th, 2011, 11:25 AM
  4. BuySellAds.com Code in <Body> Tag
    By lawrencebland in forum Help Using ClassiPress
    Replies: 1
    Last Post: May 27th, 2010, 04:41 AM
  5. Google Tracking Code and Classipress
    By tbase in forum ClassiPress General Discussion
    Replies: 2
    Last Post: April 28th, 2010, 12:15 PM