Jump to content
Sign in to follow this  
puntNL

Asynchronous Analytics

Recommended Posts

puntNL

Hi PP folks, I want to use Google asynchronous analytics, I followed the advice of NBenson: pro settings > Custom code > asynchronous analytics placeholder > save Then I checked my header script, but I can't find the analytics code anywhere. I do find, however, some advice from Pagelines in the script itself:' Recommended spot to place google asynchronous code': <?php print_pagelines_option('asynch_analytics'); // Recommended Spot For Asynchronous Google Analytics pagelines_register_hook('pagelines_before_site'); // Hook ?>

Share this post


Link to post
Share on other sites
Rob

You say "Then I checked my header script, but I can't find the analytics code anywhere." Does that mean you're looking in the header.php file? Or, are you looking at the page source in your browser? Remember, the Custom Code setup places the code entered there dynamically, and not necessarily where you might expect it. If you haven't done so, please look at your page source code and see if those analytics are appearing somewhere. It could be in the header area or the footer, written into the mix on the fly. Send a link to your site too, if you don't mind.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
puntNL

hey Rangelone, I checked the source code and find it : (Code below is displayed different (incomplete) when clicked on save comment)

So I did add the code in the PP placeholder area. Because it doesn't work, I checked the header.php file. I expected to find my added code to appear here. Not.. However I did find some words from Pagelines concerning asynchronous analytics code in the header.php file. So this seems to be the spot right?! (Because; what else (purpose) does that text mean?) ('Recommended spot to place google asynchronous code') p.s. I could mail you my url if neccessary..

Share this post


Link to post
Share on other sites
kastelic

can we see a link to your site? The header.php does not change, only the HTML page outputted by it will change. So you can see the php tag to output the analytics code in header.php. That is where the code you enter into the WP backend will appear when the page is rendered. That line of code is looking for the code you entered in the textarea, and when it finds it, outputs the script.

Share this post


Link to post
Share on other sites
puntNL
I can't give you a public link, (how) can I send you a personal message?

Share this post


Link to post
Share on other sites
kastelic
You can send me a message through my website, http://jimmykastelic.com. Sometimes Google analytics takes a few days to start tracking.

Share this post


Link to post
Share on other sites
lelas
Google recommends that we place the asynchronous tracking code in the header right before the tag. However, Pagelines recommends placing it right after the body tag. Why is that?

Share this post


Link to post
Share on other sites
puntNL
I am not sure actualy. However, because I couldn't get the asynchronous working in PP (via customcode input screen) I switched back to Google Analytics for WP plugin by Yoast.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×