Custom code with php
-
Hi!
I would like to group pageviews by main category of my posts. Like someone asked here http://stackoverflow.com/questions/36206509/google-analytics-grouping-page-views-by-page-category-wordpress
Looking inside Monster Insights settings there is a “Custom code” field that I believe I can add some JS call.
But How can I call the php wordpress function get_the_category() inside this custom code?
ga('set', 'contentGroup1', '<?php get_the_category() ?>');This will work?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Custom code with php’ is closed to new replies.