Title: Google Analytics Code?
Last modified: September 18, 2016

---

# Google Analytics Code?

 *  Resolved [heathriel](https://wordpress.org/support/users/heathriel/)
 * (@heathriel)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/google-analytics-code-4/)
 * This is working great – although I’d love to get my Google Analytics code to 
   track each new post/page load.
 * I tried entering the script as a callback, but I’m sure I’m missing something.
 * Can you assist?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [craigramsay](https://wordpress.org/support/users/malinkymedia/)
 * (@malinkymedia)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/google-analytics-code-4/#post-8241975)
 * Hi, sorry for the delay in this. Add this to your callback. This will trigger
   a new page view of th current page when a set of posts is loaded.
 * Thanks
 * ga(‘send’, ‘pageview’, location.pathname);
 *  [js100](https://wordpress.org/support/users/js100/)
 * (@js100)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/google-analytics-code-4/#post-8519614)
 * What would be the Callback right code in combination with masonry/isotope?
 * This code cause some issues at my layout:
 * $(‘.grid-blog-list’).isotope(‘reloadItems’).isotope();
    ga(‘send’, ‘pageview’,
   location.pathname);
    -  This reply was modified 9 years, 6 months ago by [js100](https://wordpress.org/support/users/js100/).
 *  Plugin Author [craigramsay](https://wordpress.org/support/users/malinkymedia/)
 * (@malinkymedia)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/google-analytics-code-4/#post-8537965)
 * Hi, Can you post a link to your site. The isotope code looks correct. If you 
   don’t have fixed heights on your items then you’ll need to wait until images 
   before laying out the new posts. Also are you using isotope or masonry as the
   callbacks are slightly different too.
 * There’s some more information on this [https://wordpress.org/support/topic/plugin-breaks-masonry-style/](https://wordpress.org/support/topic/plugin-breaks-masonry-style/)
   which covers masonry and imagesloaded.
 * Also as mentioned if you can post a link I can take a look.
 * Thanks
 *  [js100](https://wordpress.org/support/users/js100/)
 * (@js100)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/google-analytics-code-4/#post-8539697)
 * I found the problem: the single quote.
    Doing copy-paste of code from this page,
   the single quote seems not to be well written and in the callback javascript 
   output the single quotes seems badly written.
 * Thank you for your help. It works well. 😉
 *  Plugin Author [craigramsay](https://wordpress.org/support/users/malinkymedia/)
 * (@malinkymedia)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/google-analytics-code-4/#post-8542487)
 * Great glad you’ve got things working.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Google Analytics Code?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/malinky-ajax-pagination_e2c6ba.svg)
 * [Ajax Pagination and Infinite Scroll](https://wordpress.org/plugins/malinky-ajax-pagination/)
 * [Support Threads](https://wordpress.org/support/plugin/malinky-ajax-pagination/)
 * [Active Topics](https://wordpress.org/support/plugin/malinky-ajax-pagination/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/malinky-ajax-pagination/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/malinky-ajax-pagination/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [craigramsay](https://wordpress.org/support/users/malinkymedia/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/google-analytics-code-4/#post-8542487)
 * Status: resolved