Google Analytics Snippet Pack for Visual Studio
Google Analytics Snippet Pack for Visual Studio helps you write global site tag (gtag.js) code that allows you to send event data to Google Analytics. Due to the nature of this extension, you will find these snippets in HTML and JavaScript Google Analytics Snippet Pack is compatible right from Visual Studio 2012 to 2019 (Community, Professional and Enterprise).
How to use?
The Google Analytics Snippet Pack extends the code snippet manager of Visual Studio and allows you to insert code snippets into your editor. To insert snippets for the language you're currently writing in your editor, you can use the shortcut keys CTRL+K CTRL+X and then find Fancy Comments as a folder. Alternatively, to bring up the code snippet manager, use the shortcut keys CTRL+K CTRL+B. The GIF below shows HTML Google Analytics Snippet Pack being used.
OR, if you would like to send an event from JavaScript, you could do something like this -
Feedback
Should you find your use case missing in the snippet pack, feel free to create a new issue on GitHub and let me know what you're after and I can include that in the product backlog for next releases. Please search the issues first before creating a new one.
Website
https://clydedz.github.io/google-analytics-snippet-pack/
GitHub
Visit the GitHub repository.
Follow Google Analytics Snippet Pack on Facebook
Google Analytics Snippet Pack (c) 2018 Clyde D'Souza

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.



