Title: Google Analytics tracking Modal
Last modified: February 5, 2020

---

# Google Analytics tracking Modal

 *  Resolved [forevercurious](https://wordpress.org/support/users/forevercurious/)
 * (@forevercurious)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/google-analytics-tracking-modal/)
 * I have set my page so when a user clicks a blog post the Modal opens.
 * The issue is, since the user is not visiting the actual page, Google Analytics
   is not tracking it as a “page view” so cannot get “time spent on page” and other
   important page-related stats.
 * i have tracked the click event to record the number of times the blogs have been
   clicked, but this is seperate from the overall ‘page views’ and ‘time spent’
 * Is there a way to achieve tracking the modal content as a page view for the actual
   post URL pulled into the modal? Thanks in advance.
    -  This topic was modified 6 years, 4 months ago by [forevercurious](https://wordpress.org/support/users/forevercurious/).

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

 *  Plugin Author [allurewebsolutions](https://wordpress.org/support/users/allurewebsolutions/)
 * (@allurewebsolutions)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/google-analytics-tracking-modal/#post-12442375)
 * I’m not an expert in Google Analytics, so I’m not sure how to answer your questions.
   There’s probably some way to programmatically make those clicks count as page
   views, but this is a question for a Google Analytics expert.
 *  Thread Starter [forevercurious](https://wordpress.org/support/users/forevercurious/)
 * (@forevercurious)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/google-analytics-tracking-modal/#post-12463980)
 * Hi,
 * I came across this on Stack overflow, similar to what i was asking, but not sure
   how this would work with your plug-in?
 * [https://stackoverflow.com/questions/36317884/google-analytic-page-view-with-modal-overlay-ajax-content](https://stackoverflow.com/questions/36317884/google-analytic-page-view-with-modal-overlay-ajax-content)
 *  Plugin Author [allurewebsolutions](https://wordpress.org/support/users/allurewebsolutions/)
 * (@allurewebsolutions)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/google-analytics-tracking-modal/#post-12465152)
 * [@forevercurious](https://wordpress.org/support/users/forevercurious/) Nice find.
   I think it would be possible to implement this. But of course this is a very 
   specific use case and you’ll need to customize the plugin.
 *  Thread Starter [forevercurious](https://wordpress.org/support/users/forevercurious/)
 * (@forevercurious)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/google-analytics-tracking-modal/#post-12480924)
 * HI,
 * Any tips for customising the plug-in?
 *  Plugin Author [allurewebsolutions](https://wordpress.org/support/users/allurewebsolutions/)
 * (@allurewebsolutions)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/google-analytics-tracking-modal/#post-12485375)
 * Not sure what sort of tips I could provide that a developer couldn’t figure out
   for themselves. However, if you do get it figured out, I’d be happy to add your
   changes to the main plugin as a plugin setting so that you wouldn’t have to re-
   implement the changes on every plugin update.

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

The topic ‘Google Analytics tracking Modal’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-post-modal.svg)
 * [WP Post Popup](https://wordpress.org/plugins/wp-post-modal/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-post-modal/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-post-modal/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-post-modal/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-post-modal/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-post-modal/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [allurewebsolutions](https://wordpress.org/support/users/allurewebsolutions/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/google-analytics-tracking-modal/#post-12485375)
 * Status: resolved