Tracking sales in third-party iframe (no cookies)

We are selling courses, and when people want to place an order, we show an iframe from our third-party course management provider with the order form.

We have set up campaign and keyword URL parameters in Google Ads, and they work fine, but at the moment we’re not able to follow the customer all the way from Google Ads to a finished sale, including amount, to get the ROI.

We do not want to have to display any cookie/GDPR consent popups or anything like that. We’re just interested in where they come from and if/what they end up buying.

We might be able to request some additions to the third party iframe code, like adding a script tag, if necessary.

I’m envisioning something like sending some kind of tracking ID via a URL parameter in the iframe source URL, and using Javascript on the iframe side to send the tracking data to Matomo, including the order amount on their “thank you” page.

I have tried (re)searching, but haven’t been able to find anything that matches our situation.

I would be very grateful for any tips or pointers!

I’ll reply to my own thread with some progress.

I’ve found an article: Cookieless Tracking For Cross-site Iframes which seems promising, although it will be quite some work to set up, but most of it should be possible to do with Matomo Tag Manager.

1 Like

Hi @jost
It is not very easy to understand exactly which part you wants to track (the iframe content ot the iframe "host’ page?), if the thank-you page is within the iframe, where you put matomo tracking code, where you put campaign and keyword URL parameters (host page or iframe?), etc.
Also, do you use basic JavaScript tracking (via _paq), Matomo Tag Manager (_mtm), Google tag manager…?

Thanks for your reply!

I know, it was a bit hard for me to figure out as well.

First and foremost we need to get the order details when a customer completes an order. So we need the iframe to send order items and order total to us/Matomo and associating it with the correct tracking ID in Matomo.

I think we need to have our course management provider add the Matomo Tag Manager code to the iframe, and also add JSON data with the ecommerce order details on the “thank you” page. That way we can use javascript tags in MTM to send this data to the parent page (similar to the link I posted in my previous comment), which in turn sends it to Matomo.