Questions tagged [google-analytics]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
27 votes
4 answers
41k views

Disable plugin / plugin action via theme

I have installed the Google Analyticator plugin on my site. I am also using the MobilePress plugin to serve up a theme designed for non-smart-phone mobile browsers. I have set up Google Analytics for ...
1 vote
3 answers
2k views

Google Analytics tracking code on just one page?

Having an issue where I have a client who wants his Google Analytics code on just one page. I'm using the following is_page code but in the footer.php of my child theme, but it's not appearing on the ...
0 votes
2 answers
840 views

How can I add a UTM tag with PHP code to pick up the post slug dynamically in the UTM?

The thing I want to do is doable, but I don't know how to do it. Embarrassment moment coming up: I actually did this a few years ago but lost the code and can't find online how it's done. What I want ...
0 votes
0 answers
13 views

How to track multiple Contact Form 7 forms individually using GTM in GA4?

I am currently working on a project where I need to track multiple Contact Form 7 forms individually on a WordPress website using Google Tag Manager (GTM) and Google Analytics 4 (GA4). I have already ...
0 votes
0 answers
25 views

Remove old Google Analytics code on a Wordpress install

We have recently started maintaining a website built by another person. We found out that there are two GA codes on the sites. For one of them we have the login credentials. But the other one is a bit ...
2 votes
3 answers
254 views

Installing google analytics code on wordpress blog

There are many ways suggested on the internet to install google analytics code on wordpress blog and I would like to clear my doubts. When I copy the analytics code to the footer.php Will this be ...
0 votes
0 answers
124 views

how does 'init' /'parse_request' hook work for wordpress?

I wanna try to collect statistics for my wordpress website with my own plugin. the information I need is stored in $_SERVER variable. by surfing the Internet, I've two useful hooks to insert my code: ...
0 votes
1 answer
41 views

Multiple Google Analytics for Multiple pagepath

I have a landing page with one domain with multiple page path depending on my clients location, Now, I have already setup different GA tracking code and I want to track this way GA Property Code 1 = ...
0 votes
1 answer
207 views

Google Tag Manager only load when connected to Admin

I've got this weird problem and I just don't know where to look : I've installed GTM tag on my wordpress site but it seems it's only being loaded when I'm connected as an admin. How I can tell ? In ...
0 votes
0 answers
356 views

Get the link title attribute and send it google analytics as custom label via google tag manager using beehive pro for WordPress

On the WordPress site, I have beehive pro installed, (this question is beyond the support scope) and I'm trying to get all the hyperlink's title attributes and send them to Google analytics as a ...
1 vote
1 answer
1k views

wp_add_inline_script not adding when script_loader_tag filtered

I'm trying to add the new GA4 code to an existing site, and there seems to be some conflict / ordering issue between script_loader_tag filters and wp_add_inline_script. My functions.php looks thusly: ....
0 votes
1 answer
566 views

dynamic page not displaying correctly when Varnish hosting ignores query string parameters

I have a WP site with managed hosting that uses Varnish. I have a landing page that displays the appropriate images based on a couple arguments passed through the query string. So for example, ...
0 votes
0 answers
67 views

Google Analytics gtag code messes up woocommerce cart & login

I'm having this issue where this code provided by google analytics gtag, added with either wp_head() or wp_footer() or a GA plugin: <script async src="https://www.googletagmanager.com/gtag/js?...
0 votes
0 answers
202 views

Google Analytics - add script to functions.php

I want to connect google analytics to my site. I don't want to do it through the MonsterInsights plug-in. I added this script to functions.php. Will it work? <?php /** * Add functions files * * @...
0 votes
1 answer
57 views

Tracking sales/conversions in Woocommerce using Google Analytics

I need to be able to track conversions/orders in Woocommerce and have tried every free plugin available and none have worked or seem to be able to track sales correctly. Has anyone found a free ...
0 votes
0 answers
306 views

How do I export categories, site stats, comments and posts from wordpress to excel

I need to export the posts, categories, the author, the page views and comments from WordPress to excel. This is because I need to analyze the performance of each author and each category based on ...
1 vote
0 answers
545 views

Google Tag Manger - no-script Code Not Found

I am having trouble getting the "GTM no-script code not found: either missing or not in " issue resolved. The GTM script is placed after the < head > tag. No issues. However, when using the ...
0 votes
0 answers
71 views

Store GA Client ID in User DB

How can I retrieve Google Analytics Client ID from HTTP headers and store in a custom field in the User database table?
-1 votes
1 answer
25 views

Google Analytics tracking article based on post date

Is there any possibility tracking what article we post in certain date using google analytics?? If there's any way possible, please let me know. thankyou
0 votes
1 answer
32 views

When add analytics script, wordpress user login not working

When i add Google analytics script the below one https://www.googletagmanager.com/gtag/js?id=UA-XXXXXX-X″> (with actual container ID) , my user login not functioning well. I checked console, resolved ...
0 votes
1 answer
1k views

How to find and remove the tracking codes running in my wordpress site?

In one of my old websites I inserted GTM and GA tracking codes. Now when I run my website 'BathindaHelper.com' in G Chrome, its Tag extension shows 3 tags are running (2 for GTM and one for GA). But ...
0 votes
0 answers
128 views

Google analytics not picking up custom post type

I have installed a basic google analytics plugin and for the most part it works. It tracks all the pages and even taxonomies but not the custom post type. So, once you drill down on the actual website ...
0 votes
1 answer
430 views

How to make a redirection that fired a script before redirecting?

I have a software that I must host in an external server in a niche market (kind of extensions for browsers). I want to know how many people click on the link when I share it on social media. My idea ...
5 votes
4 answers
10k views

How to detect if a Shortcode is being called on a page?

I'm trying to push some variables to google analytics and would like to be able to detect if a shortcode has been included on a page at all. Anybody know a smart way going about this? Thank you! ...
0 votes
2 answers
28 views

How do I add GoogleAnalytics header snippet in WordPress?

I am not sure where exactly I navigate to add the analytics code once so it gets to all the WordPress pages. Do I change the HTML manually or can I do this from WordPress somewhere?
0 votes
1 answer
23 views

Different Google Analytics code based on Users Device

Our site has an odd GA set up with two different GA codes, 1 for desktop, another for mobile. (We use dynamic serving of website code to send different code based on User agent.) Now we have a blog ...
0 votes
1 answer
520 views

What does /?s=free&cat=plus-5-results mean in Google Analytics?

In my Google Analytics, I am seeing some "/?s=free&cat=plus-5-results" under What pages do your users visit? Does anyone know how I need to deal with this?
1 vote
1 answer
2k views

Adding parent pages to posts

I want to add a parent page to my blog posts so I can track their traffic together on Analytics. I want to avoid adding extra tracking code in the header to avoid slowing my site down. So what I want ...
0 votes
1 answer
121 views

Where does MonsterInsights put Google Analytics code?

I have looked at all the file in my theme and its parent theme, including the header.php and footer.php, but I still can't find the Google Analytics it put in. Do you know how to find its location?
0 votes
1 answer
114 views

Having a different landing page for returning users

I have a Wordpress promotional website for our web application and we have around 400 people every day. We have google analytics and Hotjar on our website to gather data on our users, and we can see ...
2 votes
1 answer
70 views

Suspicious google tag manager

I'm trying to integrate some analytics into my site and whilst debugging why mine wasn't working, I found this line being put in the head of my document: <script async="" src="https://www....
1 vote
1 answer
802 views

Add a hook to wp_mail() to track Google Analytics Event

I hope you'll be able to help me on this one: I'm trying to trigger a GA event for every email sent via a Wordpress site. My idea was to add the following code to my child theme's functions.php file:...
0 votes
1 answer
94 views

How to track analytics with a Wordpress site under the same domain as my main site?

I have a website and separate Wordpress site as well. The wordpress site is setup at mydomain.com/blog/. Currently I have google analytics tracking the main website but data is missing for the WP ...
0 votes
1 answer
519 views

WordPress gtag.js with User ID tracking

StackExchange, I am currently creating a website and wish to implement google analytics on it. I am using the new gtag.js and also want to include user id tracking. I've had a little python experience ...
0 votes
0 answers
47 views

How can I replicate this functionality on my site?

Recently, I was browsing through Reddit and found a site which is definitely using WordPress but is somehow loading Google Analytics from js-deliver. I checked js-deliver for Analytics code but can't ...
1 vote
1 answer
2k views

Sending click events to Google Analytics in WordPress: the easy way

I'm trying to setup a link tracking on WordPress. There are several links to the same site, they all share the same class: <a class="gaClickTrack" href="https://www.amazon.es/Heromask-HeroMask-...
0 votes
0 answers
33 views

Plugins menu not on dashboard

I'm new to WP and am using it through my university's account. As far as I can tell, it should be a .org site (when I hover over the WP symbol in the top left corner wordpress.org is one of the ...
0 votes
1 answer
1k views

Weird characters behind every single link and images

My site http://ilovetaobao.my If you view page source, almost every single images and links have this in the end of the URL. ?84d5a9 For example like http://ilovetaobao.my/wp-content/uploads/2014/07/...
0 votes
1 answer
87 views

Add Google Tracker Tag to Login Page

I would like to add a Google Analytics tracker tag to my login page (wp-login.php). What's the easiest way to accomplish this? Thanks!
1 vote
2 answers
715 views

Detect When User Reads Full Article? [closed]

I've been trying to find a way to detect when a user reads the full article on my blog so I can compare impressions verses actual reads (a bit like Medium does). Does anyone know of a plugin that does ...
-1 votes
1 answer
86 views

Google Analytics Event Tracking not traking

Im trying to track Contact form 7 Submission, the settings are as follows: Goal set-up = custom goal-type=event; Goal description = CF7 Submission Goal Detail: Category=CF7 Form – Action=Submission – ...
0 votes
2 answers
1k views

How to add onclick event to widget image

I have added a custom url to the widget image in the new WP 4.9. Now I want to add an onclick event to the link. The a tag looks like this <a href="http://domain.com/this-is-a-page" class="" rel="...
0 votes
1 answer
377 views

Cannot locate wp_footer() included scripts [closed]

Pulling my hair out here trying to locate the code being invoked by the wp_footer() hook. The following Google Analytics code doesn't seem to be located in any of the files in my entire web directory....
-1 votes
2 answers
1k views

How do I add google tracking code to a wordpress.com site?

I want to add google analytics to my free wordpress.com blog. I have the html tracking code but I can't figure out how to add it to my blog from the wordpress.com dashboard.
1 vote
1 answer
461 views

Authorizing a plugin to call Google Analytics v4 API on wp_cron

I am building a plugin that will need to access the administrator's analytics account and pull some data on regular intervals, using the WP-Cron mechanism. I have looked at the instructions for ...
-1 votes
1 answer
24 views

Google Tag Manage - to use or not to use

I was interested in know the feedback from those who have used Google Tag Manager on WordPress. Basically, I want to know the advantages of implementing Google Tag Manager. Till now I have been using ...
-1 votes
2 answers
2k views

Google analytics not working on WordPress

I recently created a site using wordpress here http://www.volatileinterface.com/. I created a google analytics account and then added the tracking code to all of my pages using a plugin from the ...
1 vote
1 answer
13k views

How Can I Add OnClick Event To A Specific Wordpress Menu Link

I need to add the following: onclick="goog_report_conversion('tel:800-123-4567')" To a specific menu link being generated by WordPress. How can I achieve this? Thanks.
0 votes
1 answer
37 views

Google verification challenge with file location

Our team lost access to our Google Analytics account and the only way we can get it back is by inserting a text file into our website. However, the link for uploading files is something like www....
3 votes
2 answers
2k views

Does wordpress insert automatic google analytic?

I just noticed there was this script in my source code: <script src='/google_analytics_auto.js'></script> I did not insert this script and I have no plugins, so I don't know why it's ...