This topic contains 19 replies, has 2 voices, and was last updated by Hudson Atwell 10 hours, 21 minutes ago.
-
AuthorPosts
-
February 11, 2019 at 3:33 pm #134452
My funnel consists of 3 steps. Step 1 leads to Step 2, Step 2 leads to a third and final page.
If we would like to track the performance of landing page variations for Step 1 and variations for Step 2, what is the best way to pass the unique conversion shortcode from the landing page variation served in Step 1 to whatever landing page variation is served in Step 2 so it fires on page load and we can record the conversion?
Thank you
February 12, 2019 at 11:58 am #134454Good question, I’ll see if I can help. I bet there are a couple of ways we could solve this.
I’ll start with a few questions.
Does the user arrive at step 2 via Form submission or via clicked link?
And for Step 2 to Step 3? Does the transition occur from form submission or from link click?
Are you able to edit the PHP code of your variations?
Is it possible you could link me to Step 1 privately?
February 12, 2019 at 12:24 pm #134456This reply has been marked as private.February 12, 2019 at 2:08 pm #134461Since Step 2 is approached via link in step 1, you could add a special parameter to your Step 1 link like this:
https://mydomain.com/go/step2/?origin=0, where 0 is the variation ID of Step 1.
Then inside your Step 2 variation’s custom JS you could place this JavaScript code:
var salt = "e05c2685ee21b8ecdb8307d229e00b0e"; /* replace with salt */ var pageid = 1234; /* replace with step 1 page id */ var urlstring = window.location.href; /* do nothing */ var url = new URL(urlstring); /* do nothing */ var vid= url.searchParams.get("origin"); /* do nothing */ var callbackurl = window.location.protocol + "//" + window.location.host + "?postback=true&event=lp_conversion&id=" + pageid + "&vid="+vid+"&salt=" + salt; jQuery.ajax({ 'url' : callbackurl, 'success' : function(result) { console.log(result) } });
You’ll need to replace pageid and salt variables with the page id of step one landing page and the salt it provides in the callback url area:
If all works well the correct variation for Step 1’s landing page will show an increased conversion count.
If no ?origin=vid is present then it won’t increment any conversion counts.
February 12, 2019 at 3:15 pm #134462Thank you.
Is the variation ID (vid) hard coded?
The issue is that Step 1 may have multiple variations and Step 2 will have multiple variations.
Hard coding a variation would not work.
February 13, 2019 at 10:29 am #134467There is a measure of hard coding, but it should not be hard to implement, and you will not have to edit template code, only add JS code into the metabox area named ‘Custom JS’ that’s available when editing any landing page variation.
In Step 1, for each variation, make sure that each link leading to Step 2 contains the ?origin=vid (replace vid with the variation ID of the Step 1 page).
So variation A of Step 1 will have a link like this leading to step 2:
https://mysite.com/go/step-2/?origin=0In variation B of Step 1 we will have a link leading to step 2 that looks like this:
https://mysite.com/go/step-2/?origin=2Then on Step 2, in all your variations, paste the JS code above into the Custom JS metabox.
Now whenever a Step 2 page is loaded it will read the ‘origin’ value from the URL and send the conversion callback, incrementing the correct variation for Step 1.
Does that make sense?
February 13, 2019 at 11:00 am #134470This reply has been marked as private.February 13, 2019 at 11:16 am #134473Yes everything looks correct. I tested the Step 1 to Step 2 transition and the callback fired once and reported a success message. There should only be one increment.
Will you clear stats and try again, just to make sure?
February 13, 2019 at 11:18 am #134474This reply has been marked as private.February 13, 2019 at 11:22 am #134475This reply has been marked as private.February 13, 2019 at 11:30 am #134476This reply has been marked as private.February 13, 2019 at 11:52 am #134477This reply has been marked as private.February 13, 2019 at 12:15 pm #134478This reply has been marked as private.February 13, 2019 at 1:08 pm #134481This reply has been marked as private.February 13, 2019 at 3:53 pm #134483This reply has been marked as private. -
AuthorPosts
You must be logged in to reply to this topic.