Ajax submit multipage with different urls for each step

deltafidesign 07 Jul, 2016
I have a multipage form. Each submit step is in ajax, so the url for each step is the same. I need to monitoring each step with Google Analitycs, so I would have different urls for each step even if the form load each step with ajax. Something like that:

Steo 0 - www.mysite/contact
-> ajax submit ->
Step 1 - www.mysite.com/contatc/step1
-> ajax submit ->
Step 2 - www.mysite.com/contatc/step2
-> ajax submit ->
Step 3 - www.mysite.com/contatc/step3

.... and so on.

How could I do that if possible?
GreyHead 07 Jul, 2016
Hi deltafidesign,

I'd suggest that you do the update from the server using PHP, that way you can customise the data you send as you need. The Google Measurement Profile will let you do that using the ChronoForms cURL action to send the data.

Bob
deltafidesign 07 Jul, 2016
Hi Bob thanks for reply, I'm not able to do what you suggested. :-)

I use tag manager to track the form, but in this Ajax multipage form

The problem is that the bottom that confirm on the fisrst page and the last bottom of the second page has both the type=submit and so tag manager track them twice and i'm not able to track if a person compile the first page only or send the form till the end.
When i compile the form in the first and in the seconf page my link remains always the same www.mysite.com/contact

Is there a way to make the link of the first and the second page different?
ex. www.mysite.com/contact?=step1 (or something similar ?)

In this way i'll be able to track both the buttons.

If not, there is a way to convert the button on the first page of form from type=submit to type=button. In this way tagmanager doesn't track the first click, but only the last button.

Thank you
GreyHead 07 Jul, 2016
Hi deltafidesign,

I don't know anything about Tag Manager so can't help with that. You can try changing the button type but I think that you then have to hand-code the Ajax submission to run the form submission. Maybe you need to edit the Tag Manager code to detect what is being submitted and only update on the final submission?

Bob
This topic is locked and no more replies can be posted.