Setup Instructions

How to get set up

1. Install the NuGet package

Install-Package GAEvents

or Install the Umbraco Package

https://our.umbraco.com/packages/website-utilities/ga-events/

2. Rebuild the solution and run the site.

This will register the custom section, dashboards, api endpoints and database table to get it ready for use.

3. Assign permissions to use it

In order to be able to use GA Events in Umbraco, you need to give permission to a user or group in the Users section.

4. Purchase a licence

You need to purchase a licence if you want this package to work on your production website.

The current price is £95 and you can purchase a licence from Gumroad.

5. Gumroad licence code

Get your Gumroad licence code from the purchase confirmation email you will receive from Gumroad after you have successfully completed your purchase.

The code looks like this:

6. Generate your licence key

To generate your licence key, go to the Generate Licence form and enter your Gumroad licence code and the production website you wish to use it on e.g. https://mywebsite.com

If you enter these details in the form on the purchase confirmation page, it will generate your GA Events licence key for you.

7. Add your GA Events licence in Umbraco

To save your GA Events licence details in your website do the following:

  • Go to the GA Events section in Umbraco
  • Click on the licence tab
  • Copy your new licence key and paste it into the Key field
  • Copy the domains value and paste it into the Domains field
  • Press save
  • If you have entered the fields as they are in the licence details provided above then your licence will show as Valid.
  • If you see a message which says your licence is invalid, then please get in touch via the contact form.

8. Creating Events to track

 

9. Sending events to Google Analytics

For this package to work you need to use Google's analytics.js

In the below code snippet, replace the UA-XXXXXXXXX-1 with your analytics id from Google Analtyics.

Make sure you put this code after the opening body tag in your master template or on all of the pages you wish to track events on.

<!-- Google Analytics -->
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-XXXXXXXXX-1', 'auto');
</script>
<!-- End Google Analytics -->

On the front end of your site, include the gaEvents script which comes with this package:

<script src="/scripts/gaEvents.js"></script>

Now all you need to do is create some events and you will start seeing them show up in the Events section of your Google Analytics account.