Updating to Google Analytics 4 (GA4)

Google will be fully moving over from Universal Analytics (UA to Google Analytics 4) by July 1st, 2023. GA4 is promising to be more flexible and comprehensive than previous versions. Due to the new changes, only the latest version of Google’s event code (gtag) will work, and the others (ga and gaq) will stop working once the move has been made.

If you need any support, Google’s Help Centre has plenty of practical resources. For help with more complex transitions, we recommend contacting one of our trusted partners, The GO! Network. Based on your individual needs, they’ll refer you to the most appropriate specialist who will guide you through the migration process. You can book an initial chat and one of their expert team will be in touch.

In order for your Moneypenny Live Chat to be tracked using GA4, please follow the below steps (which are based on the assumption that you have the Messaging & Live Chat widget code posted in your website’s HTML. If you use a content management system, please visit this page for set-up instructions):

Firstly, follow this link which will take you through the steps of attaching a GA4 property to an existing UA property. 

Once this is complete, it’s time to combine GA4, Moneypenny Live Chat and event code.

1. Place the GA4 code high in the first tag on your website’s HTML, as per the example image.
2. Enter your gtag Moneypenny event codes within the JS API code space, after “/*Place your Moneypenny API code below*/” like in the example image. In this example image, we have used the “StartChat” event code and “Chat Message Received” event code.

Testing your GA4 tracking property

Once you have inserted the GA4 tracking code, it can take up to 24 hours to start tracking. You will see a green notification across the top of your Web Stream Details screen once tracking is active; you are now ready to test the GA4 tracking code. The events will be triggered on your website, so you will need to check them in Analytics’ Realtime Dashboard.

Once the events have been triggered on your website with the tracking code (e.g. minimizing the chat box and opening a chat, “ChatWindowMinimized” and “openingChat” events), click on Realtime reports, then scroll down to “event count by event name”. It may take a short time for the analytics to appear.

Code snippets for chat events

Below are the code snippets you’ll need for each one of the chat events that you can track. When you use GA4, just be sure that you use gtag (gtag.js) codes.

StartChat

Button Event

OpenProactive

ChatMessageRecieved

Close

Open

StartCallme

MessageSubmit

Minimize

ChatEnded

Your GA4 Google Analytics should now be updated. Don’t forget, if you have any questions about any of the instructions above or need additional support, please don’t hesitate to get in touch. Our Support Team are available on 866.202.0005 whenever you need.