javascript – Track visitors across different domains using Google Analytics even when they don’t click between the sites

Apparently there are ways to track visitors across different domain using google analytics as described in documentation here and here.

It follows the principle where a visitor click on a link on and get redirects to with some additional path params which helps GA track if the visitor is same and GA maintain it’s session.

I have been looking around a lot and couldn’t find a solution on how can I track a visitor which comes on through ads and then leaves (And/Or open new tab) and immediately/later goes on to and make some purchase. I am not targeting to maintain session per user but at least I need to know if it’s the same visitor which goes there and converts.

I definately have access to both sites and can put GA tags and javaScripts on both websites.