Jump to content

Visitor Tracking Via Dynamic Url Query Parameter


Recommended Posts

I am attempting to make Revive work for me in a somewhat different use case. I want to be able to display rotating banner ads but I also have forms that I want the ad server to serve up. That way, as they change, they can be easily updated in the ad server rather than at every site.


I've got the ad server serving up the form without much issue. I've also added some visitor tracking code as a prepend to the Zone. This code essentially grabs everything in the PHP Global variables of $_REQUEST and $_SERVER. However, what I've done before using Revive is to have the visitor tracking code create a unique ID for each visit (using md5), the visitor file is saved with the name {uniqID}.visit, that unique ID is saved to the $_SERVER variable as $_SERVER['uniqID'], and the unique ID is passed to the form via URL query parameter like http://form.com/form1?id=<?php echo $_SERVER['uniqID]; ?>.


When I pull in the form like this <iframe .... src="http://form.com/form1?id=<?php echo $_SERVER['uniqID']; ?>></iframe> as part of the page then everything works and has for years now. However, when I use this same iframe code as banner code the PHP does not execute so every id param is the un-executed string <?php echo $_SERVER['uniqID']; ?>.


Ultimately I need to be able to pass an id to most of the things I display. And I typically want that ID to be dynamic (i.e. created by PHP via md5 at the time of the visit) so that I can sync the site visits to my conversions, partials form fills, etc. It seems hard to believe I'd be the first one to want to be able to do something like this.


Any suggestions on how I pass a dynamic tracking string from the revive ad server request to the form revive is serving?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...