Allow authors to use their own Google Analytics code
Use conditional tags for each author with their tracking code in a custom function. is_author( ‘4’ ) && is_single() )
Use conditional tags for each author with their tracking code in a custom function. is_author( ‘4’ ) && is_single() )
Popular posts – based on pageviews
Google analytic issue in wordpress
As long as you’re quotes are escaped to render the final code correctly, you should be fine either way. That just a matter of preference. If you go with the first route, you’ll be able to migrate your scripts to an external source with very little extra effort. The second way can get a little … Read more
I kindly and respectfully ask the community to take 30 seconds out of your day and please explain this phenomenon to me. I get that it’s cool to either ignore or ridicule those who are not savvy with this sort of stuff, but I need to know how this is happening, who’s behind it and … Read more
I finally found the answer buried in deep inside the Admin panel for customizing the particular theme that’s being used. Funny, because I looked there already, but missed it the first time around. Evidently, these particular options are saved into a database which explains why scanning for keywords found in all the site files came … Read more
I normally use the official WooCommerce Google Analytics plugin, it has been developed by WooCommerce, so that’s always nice. There is a free version and a paid version. Sometimes you get what you pay for, I think the paid version is worth it but I guess it depends on your needs. Here is a comparison … Read more
How can I replicate this functionality on my site?
You could cookie them. Issues you may run into: users with ad-blocking software may reject the cookie altogether, but they may also be familiar with that pitfall. Users may also manually clear cache/cookies and not benefit. Another caveat is if you use caching, cookies can be a bit tricky to get working reliably. Finally, depending … Read more
The interesting question is: how are the analytics codes inserted? If it is inserted by a “google analytics” plugin, you won’t have that much luck. If it is inserted directly into the theme files, you can change the Code to send a “custom session dimension” to send the information, which type of device is used, … Read more