Question

Cross Domain/Sub Domain Tracking with Flutter Web

  • 30 May 2023
  • 2 replies
  • 331 views

What is the proper way to track users that navigate from a domain to a sub domain using Flutter web?

My company has a Webflow landing page (www.example.com) and a Flutter web application page (app.example.com). We’ve added Amplitude to each of them and can successfully track users on the separate domains. The issue occurs when we send users from the Webflow landing page to our web app. When this happens, a new device ID is generated and it appears as if there are two separate users.

I’ve seen this article on setting up cross domain tracking but the language seems specific to “cross domain” tracking. Will the steps in this article work for subdomain tracking? 

On a similar note, the Amplitude SDK for Flutter does not have a “deviceId” property in the init() method so I’m wondering what the correct steps are on Flutter Web.

Thanks!

 

Other links:


2 replies

Userlevel 5
Badge +8

@Joe Muller great question, I’ve asked someone from our integrations team to weigh in here. 

Thank you!

Also, we are using this JS wrapper to on the Webflow side: https://github.com/amplitude/amplitude-js-gtm

I’m wondering if this wrapper sets the Amplitude cookie the same way. I did some testing yesterday and the Flutter web app sets the cookie according to this article. The cookie name is “amp_xxxxxx” and the contents are not encoded.

The webflow page sets a different cookie (AMP_XXXXXXXXXX) and the contents are base64 encoded. Could this be causing the issue? 

Reply