Has anyone come across any best practices for combining JS and PHP Curl calls? It’s absolutely essential for us that every user has a VisitorID, as we’re using it for purchase tracking
This is our current workflow
-
If no cookie
Perform a PHP call to track the page and return the Visitor ID, store in session + cookie -
If cookie
Display the JS only, setVisitorID from the cookie. VisitorID stored in session
This method ensures that for every unique visitor, there is always going to be a VisitorID available to server side PHP, even if only one page view is registered.
I’d be interested in learning more about combining JS and Curl tracking together, as we’d like to have the javascript functionality available at all time. Any thoughts or other approaches?