I'm very new to Google Analytics.
How can I make a virtual pageview only for a dynamic page included in a HTML template?
Please just refer to my code below to know more details of the situation.
A dynamic page [Price Details] pops out when you press the button [Show Price].
URL or even template doesn't change when this dynamic output appears, because they both are in ONE template.
I'd like to count up how many people actually have seen [Price Details], so can anyone tell me how to get a virtual pageview only for the dynamic page?
I'm using gtag for your info. I will appreciate so much any idea about this! Thanks!
<div class="section">
<a href="#" id="buttonSet" class="button"><span>Show Price</span></a>
</div>
・・・
・・・
bla bla
・・・
・・・
<header class="head">
<p class="title">Price Details</p>
</header>
尝试添加以下onclick浏览量触发器:
<a href="#" id="buttonSet" class="button" onClick="ga(‘send’, ‘pageview’, ‘/virtual/guides/download/social-media-guide.pdf’);><span>Show Price</span></a>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.