Skip to content

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.

License

Notifications You must be signed in to change notification settings

ClydeDz/google-analytics-snippet-pack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Analytics Snippet Pack for Visual Studio

Build Status

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).

Google Analytics Snippet Pack in Visual Studio's Code Snippet Manager

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.

GIF showing HTML Google Analytics Snippet Pack in use

OR, if you would like to send an event from JavaScript, you could do something like this -

GIF showing JavaScript Google Analytics Snippet Pack in use

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.

Facebook

Follow Google Analytics Snippet Pack on Facebook

Google Analytics Snippet Pack (c) 2018 Clyde D'Souza