Archived topic
Tracking Blog Post Comments with GTM
3 replies · Started by Joseph Sloan on August 21, 2020
Hi,
I'm trying to track comments on blog posts as events in Google Analytics, through Google Tag Manager. I have an AJAX listener for my newsletter sidebar and contact form that work like a charm. But for comments I don't seem to be catching any meaningful variables. When a comment is posted the page reloads with an anchor link to the comment (example: /hello-world#comment-2). I tried to create a trigger based on URL but the anchor portion of the link is not present in any variables.
Do you have any suggestions on how I can track blog comments with GTM in generate press?
Hi there,
I don't have any experience with this, unfortunately.
However, this post may help: https://penguininitiatives.com/google-tag-manager-tracking-guide-wordpress/
I also found this one, but not sure it applies to default WordPress comments: https://www.analyticsmania.com/post/track-comments-with-google-tag-manager/
Thank you Tom! Sorry I should have closed this ticket I found a solution. I'm loving generate press and how simple everything has been; great theme!
Julius at analytics mania is a great resource! The linked article (https://www.analyticsmania.com/post/track-comments-with-google-tag-manager/#default-form-submission) option number two works for tracking Generate Press blog comments.
Glad you got it working! :)