Track GA event in Piwik using Tally

Hi,

I am using tally.so and want to track the custom events tally is sending : Google Analytics integration

Unfortunatly I can’t make it work. I tried a lot of different things (Custom Goals, different Tags, different triggers).

The event I see in the debugger is the following:

{
  "0": "event",
  "1": "Tally.FormSubmitted",
  "2": {
    "event_category": "/votre-avis-compte",
    "event_label": "Votre avis compte",
    "non_interaction": true
  }
}

What do I need to do?

Thank you
Jeff

Hi. I’m not really into Tally, but I’d check how did they implement Google Analytics integration on the technical level. All we need to do is capturing all the important event data and forwarding it to Piwik PRO. Do you have any publicly available website where such a form could be tested? Ideally, with Piwik PRO container installed? I’d also need some information on what exactly you want to achieve. I assume it’s all about sending a custom event to Piwik PRO with a few values like category, action or label.

Hi,

here is a form with a Piwik container : Track GA event in Piwik using Tally

Yes, I would like to have a custom event with those values.

Thank you
Jeff

The way tally handles form submit is a bit weird. Indeed, a datalayer event is pushed, but the structure makes it really hard to use in Tag Manager.

{
  "0": "event",
  "1": "Tally.FormSubmitted",
  "2": {
    "event_category": "/Track-GA-event-in-Piwik-using-Tally",
    "event_label": "Track GA event in Piwik using Tally",
    "non_interaction": true
  }
}

It would be much easier if it was something that’s standarized in some way, like:

{
  "event": "Tally.FormSubmitted",
  "event_category": "/Track-GA-event-in-Piwik-using-Tally",
  "event_label": "Track GA event in Piwik using Tally",
  "non_interaction": true
}

I don’t think there’s an easy way to solve it for now besides writing a really custom javascript code that would intercept such event. So, iterating through datalayer to find an object with first property set to Tally.FormSubmitted. I’m also not sure what would be the value besides catching the information that a form has been submitted. It’s a pitty that this event does not contain additional data such as the picked option (yes/no).

Other option would be to create a trigger that accepts all datalayer events with condition that checks the following dataLayer variables:

image

But as you can see, it does not look clean at all.

Yes indeed, the data is not clean at all. I will open a ticket with them.

I wanted to track this event, because I will show a popup to visitors to participate in a survey. If they responded to the survey, I would no longer show them the popup. (If this is even possible)

I will just redirect to a different page and track that.

Thank you for your quick help.
Jeff

You would have to set some value in local storage / cookie after the survey is completed. But yes, that should be possible. It’s weird that tally doesn’t even push a standard form submit event.

1 Like

This is the reponse from tally:

Filip Minev 11 minutes ago

This is the format we sent the data

{ "event" : "Tally.FormSubmitted", "event_category": "/votre-avis-compte", "event_label": "Votre avis compte", "non_interaction": true }

Don’t know why you don’t see it like that in Piwik pro

Here’s the snapshot of datalayer read with console.log and it doesn’t look like that:

image

And here is the response from Tally:

This is the gtag event format we follow, which comes from GA’s documentation.

gtag('event', <action>, { 'event_category': <category>, 'event_label': <label>, 'value': <value> });

So in the case of the Form submit, it will look like so:

gtag("event", "Tally.FormSubmitted", { "event_category": "/Track-GA-event-in-Piwik-using-Tally", "event_label": "Track GA event in Piwik using Tally", "non_interaction": true });

This is meant to work with GA, but I’m not familiar with Pikiw PRO and how they expect the data to be formatted.

(イベント  |  タグ  |  Google for Developers)

Alternatively, you can listen to the Form submit event and trigger your own custom code if that would solve the issue for you.

I don’t know how gtag relates to datalayer when it comes to structure, but clearly the final format cannot be easily read by Piwik PRO.

When it comes to the form submit, I don’t see such event. So, most likely Tally is handling the form in a custom way. I just copied the HTML of the form to my dev env and it generated an event. For some reason it does not work for your example form: