Is there a way we could trigger a goal when a row is added to a Google Sheet?
We have a form that sends results to a Google Sheet. (It’s an embedded form hosted from a third party.) The goal we are tracking is the completion and submission of the form. So when the form sends results to to the sheet, we know it’s been successfully completed.
I’ve tried working through the challenge with a couple of AIs but had no success with the solutions they provide. They suggest adding a script to the sheet that triggers when the row is added, sending a signal to Matomo for the goal.
We have Matomo set up in our WordPress site via the plugin.
From my understanding, you could also build on top of Matomo API + Google Sheets API, i.e. you’d have a Python script or PHP script that syncs those 2 APIs and based on your trigger from Google Sheets API it would mark that as a goal conversion through Matomo API.
As I said, it might or might not work, but pls let us know how you go with it. Thanks!
If the form is hosted on GForms… Then you’re out of luck because that’s another domain within an iframe, one that you cannot reach with your tracking code.
And since it’s stored in a 1st party cookie… That value cannot be passed on to the Google Form.
On the other hand… You could theoretically use the hashed email as uid/User ID… But you have the email ONLY after the user sends the form.
There’s no way you can stitch the data together, even if you’ll manage to track goals, you’ll not be able to assign goal to any of the dimensions, such as acquisition channels.
No luck, the only way out I see is actually using a 1st party form on your website.
If anybody is interested, this is the kind of thing I get from the AI. The script would be added to the AppScript for the Google Sheet that receives the data from the form (TypeForm). I’ve gone through several variations and had no success.