Issue with Tracking Code for Custom Post Types – How to Fix
-
Right now, the way the plugin is coded on inc/hs-analytics.php, the plugin will pass along the wrong content type if your website uses custom post types. Lines 26-31 read:
// Pass along the correct content-type if (is_page() || is_front_page()) { echo '_hsq.push(["setContentType", "standard-page"]);'."\n"; } else { echo '_hsq.push(["setContentType", "blog-post"]);'."\n"; }
The fix for this problem is simple, I believe:
// Pass along the correct content-type if (is_page() || is_front_page()) { echo '_hsq.push(["setContentType", "standard-page"]);'."\n"; } else { echo '_hsq.push(["setContentType", "blog-post"]);'."\n"; }
Can you please confirm that this is the case, and if so, update future versions of the plugin accordingly?
Thank you!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Issue with Tracking Code for Custom Post Types – How to Fix’ is closed to new replies.