With your google analytics app set up, we get analytics data for the customer portal. This is good, but it could be better.
The problem with the current solution is that one customers journey is divided in two sessions, even if we give the same analytics property, they show up as two sessions. Due to the customer portal and the website being on different domains.
There is a work around for this, documented by google here: https://developers.google.com/analytics/devguides/collection/gtagjs/cross-domain
My proposal is that you allow us to include a query parameter name in the analytics app, and if we include that query parameter when we link to the customer portal, you will take the value from the configured query paramter and send it to GA to use as the client id for the session. This would link the customer portal session to the session the main website, and provide a more seamless analytics experience. Also, this feature would be totally opt in, if you dont add a query parameter or do not provide one, your original functionality is unchanged.
The second part to this would be to add a query parameter with the client id when sending traffic back to the main website. I dont know exactly hot to best fit this into your product, maybe a domain filter input on the google analytics app, If the link goes to that domain, include the client id as the parameter already configured. If the end user journey started on the main website, then customer portal and back to main website, it would be client id from the original main website session that came back. If the session was started on the customer journey, it would be the client id from the customer portal that propagates over to the main website, which is fine, they are the same property.

