nystudio107 / craft-instantanalytics

DEPRECATED: Instant Analytics brings full Google Analytics support to your Twig templates and automatic Craft Commerce integration with Google Enhanced Ecommerce.
https://nystudio107.com/
Other
20 stars 9 forks source link

[FR] Trigger measurement protocol event via javascript #48

Open pepsDev opened 3 years ago

pepsDev commented 3 years ago

Hi,

I would like to track events like clicks on email addresses or phone numbers. For this I would hate to have the whole GA javascript library loaded. Instead I would like to simply trigger a controller via javascript, which then transmits the event via measurement protocol. This way you don't have to load the whole library directly.

Would it be possible to trigger a measurement protocol event via Javascript with an plugin controller?