A site I’m working on has a mailing list subscription form. On submission, the user is subscribed to a Klaviyo list via the API.
Previously, there was an embedded form, and UTM tracking information from query parameters was automatically included, and showed up against the user so my client could see where they came from.
Now, however, we’ve built a custom solution which does not use the Klavyio-provided JS, and instead communicates with the Klaviyo API directly. There is currently nothing passing through any UTM query parameters to Klaviyo. I need to restore this feature.
At the moment I’m using a 3rd-party integration with Klaviyo, and I can see from reading its source code that it is using the deprecated v2 version of the Klaviyo API. I’ve opened a feature request for them to update this, but that is not the primary concern right now.
I am not averse to writing and submitting a patch to that integration which adds the tracking information submission. I don’t much care whether I also upgrade it to the new API at the same time or not; whichever is easiest. I can worry about the deprecation later if it’s simplest to leave it at v2 for now.
So: is it possible to send the UTM tracking data with the v2 subscription API call? I can’t see anything about it in the relevant v2 endpoint documentation, so if it is possible, how do I do it? If I need to make a separate call after or before subscription, what would those look like? If it’s not possible with v2, how is it done with the current API?