Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Analytics integration for subsites using GA Filters
- This topic has 7 replies, 2 voices, and was last updated 7 years, 8 months ago by
Scholto Bos.
-
AuthorPosts
-
October 4, 2018 at 11:00 pm #19405
Scholto Bos
ParticipantHi Marek,
I have a question about seperate analytics tracking for different subsites in google analytics.
Only search queries from my mainsite finler.nl are tracked in google analytics, but I don’t see the search queries back from subsites like finler.nl/creditcards/ and finler.nl/shop/
I made a screencast to show what my problem is and what I did to get it work (with audio). Please see: https://screencast-o-matic.com/watch/cF6fr1Y2wm
Attention. When you log in, you first get a safety popup. Please fill out on the first pop-up:
user: *
pass: *I hope you can help me.
Kind regards.
Scholto Bos-
This topic was modified 7 years, 8 months ago by
Ernest Marcinko. Reason: login info delete
October 6, 2018 at 2:26 pm #19407Ernest Marcinko
KeymasterHi!
Thank you for all the details, I think the problem might be either incorrectly set query string there or something a bit different (details below). On the google analytics page, where you set the query parameter, that should be the same as the one on the plugin back-end: https://i.imgur.com/iMMusJj.png
On the plugin back-end it should be:
[code]?s={asp_term}[/code]I have checked if the function sends the pageview string, but it is sent. A possible issue might be, that the ‘_gaTracker’ google analytics function might not add the subsite directory through. Within the plugin the URL sent in a relative format such as ‘/’ + query parameter. I am guessing, that the ‘/’ migth only represent the root directory in all cases, which would explain the problem.
So, I logged in via FTP, and made a change to include the document path within the pageview, so now the plugin will always send the pageview string relative to the current site home page. If this change works, I will include it in the upcoming release.There is also this notice on the console here: https://i.imgur.com/dvkLCyQ.png
When testing, make sure to disable that feature, or use an incognito window to test, as otherwise the tracking might be disabled overall.Make sure that the query string is set to s on the google analytics dashboard, and then hopefully you should start seeing the queries within the subdomain paths.
October 7, 2018 at 12:59 pm #19415Scholto Bos
ParticipantHi Ernest,
Thanks for your quick answer, investigation and adding the code snippet. I checked all settings and they are all correct. I queried the search function on the shop and creditcard subsites (on several devices incognito and logged out) but I don’t see results.
But I think you’re not far from a solution, because yesterday between 15.00-16.00 h. 1 query on a subsite was registered and I think it must be from you. See screenshot: https://screenshots.firefox.com/iUxE3DKWrllaaLfA/analytics.google.com
Can you reproduce if you made some changes to the code snippet after doing the search query?
Thanks in advance.
Scholto BosOctober 7, 2018 at 1:14 pm #19416Ernest Marcinko
KeymasterHi!
That was a test query by me, after the change. That means, it should be working.
I believe the cache is still serving the old/unchanged files. I just checked, and the unchanged versions are served on incognito, and sometimes when logged-in as well. Make sure to clear all layers of cache (page, minify, CDN, Cloudflare etc..), that will update the code to the changed version.
You can also safely update the plugin to 4.14, it was released yesterday, and this change is included in it. Don’t forget to clear the caches afterwards as well. That should hopefully do the trick.
October 7, 2018 at 1:16 pm #19417Scholto Bos
ParticipantGreat, I will do and keep you posted. I’ll send you a final email tomorrow.
October 8, 2018 at 7:29 pm #19448Scholto Bos
ParticipantHi Ernest,
Thanks for yor time. Everything is working fine now.
Could you please delete the information about the safety popup in the first ticket post?
After that you can close the ticket.Thanks!
ScholtoOctober 8, 2018 at 7:45 pm #19450Ernest Marcinko
KeymasterYou cannot access this content.
October 8, 2018 at 7:46 pm #19451Scholto Bos
ParticipantThanks! Have a nice evening.
-
This topic was modified 7 years, 8 months ago by
-
AuthorPosts
- The topic ‘Analytics integration for subsites using GA Filters’ is closed to new replies.