Welcome to my online portfolio
26 December, 2017
3 keys for Big Data and Humanitarians
29 January, 2018
Show all

Configure Google Analytics goals on Wix

Setting Google Analytics goals on Wix

Setting Google Analytics goals on Wix

It is possible to set your GA goals on Wix

It took me 3 days, but I was able to figure it out.  Depending on your implementation and what you need to measure, with the help of Google Tag Manager, you can throw tags whenever a page is viewed or an event is tracked.

In my case, I needed to track submissions on a form.  Even if Wix doesn’t support it organically, you can track form classes and IDs if you want, and throw tags or events that can be traced by Google Analytics.  Since tracking the elements is a bit more complicated (Wix transforms and changes and masks all of the elements tags and IDs) I changed the action on my Wix form to go to a link, instead of showing a message. This way, I could track a conversion once GA sensed that such link was opened.  However, since Wix also changes the real URLs, I could not just set a “destination” goal on GA. Therefore, I also installed my tracking code from Google Tag Manager on a HTML frame, and placed it on the website header, for it to be accesible in all pages.

I tried many times and many ways, and this is the configuration that finally worked:

  1. Enable “Page path” on your built-in variables if you do not see it on your Variables list
  2. Create a new trigger. Use type “Page View”, and select to trigger on “Some Page views” (I just needed one conversion on a single site). Then, select “Page Path” from the drop-down, “equals” <your URL without the domain>. For ex, “/submit” instead of “google.com/submit”.  I tried using “Page URL”. Didn’t work because the URL created by Wix is insane, and it is not the same that you get when you create your page.
  3. Create a new Tag. Use type “GA Universal Analytics”. Use track type “Events”, type anything you want on the Category, Action, Label and Value, but write them down, because you will need them when you are setting the goals on GA. Check the “override settings on this tag” and type your GA tracking code.  Then, on the Trigger section below, select the trigger you previously created.
  4. Click Publish, write down some details (for the record) and hit publish again.
  5. From Google Analytics, click the Admin icon and click Goals
  6. Create a new goal. Select Custom, then select goal type “Destination”.  Now, in the Destination, instead of using “equals” or “begins with” use “Regular expression”, with ^/<your URL>. For example, if your Wix URL is “google.com/submit”, type “^/submit” (without the quotes, of course).  Why not just use your URL? Because if you debug your tag firing with a chrome extension, you will see that the URL that  GA receives is a big mess, and it doesn’t even compare to yours.
  7. Test your conversion goal, and see it on GA, on the Real Time tab, on Conversions.  If everything is set up correctly, you should be able to see your conversion completed immediately.

The reasoning behind all these is that Wix does not support Google Tag Manager nor Google Analytics goals natively, therefore, you have to do it manually.

If you have any questions, send me a comment or email me at andres@ajsm.me

Leave a Reply

Your email address will not be published. Required fields are marked *