@Geoff Jackson helped me to write this little how to.
If you have a website with a lot of Ajax in use or just steps/goals that you can not identify via URL you will have to use extra
pageview-tracking. That is because Google Analytics does not allow custom events or dimensions in their goal steps.
On each page of your website is a button that opens a lightbox with a registration form.
When your visitor registers, there will not be a 'thank you' page. Informations about next step, that he has to check his email account for an activation link, will show up in this lightbox too. Your goal is that a visitor activates his account by clicking this link in email that you have sent him.
First we integrate the events for...
... starting registration process. This event will be fired as soon as the lightbox with registration form opens.
ga('send', 'pageview', '/regStart');
... next is when he sends the
regform. Event will be fired as soon as server answers via Ajax that confirmation mail was sent and on screen is an appropriate message.
ga('send', 'pageview', '/regSuccess');
... and finally, we setup an event for our goal. That will be fired as soon as he clicked the activation link in the confirmation mail.
ga('send', 'pageview', '/accountActivated');
This last step is not necessary if you've a special 'account activated' page. But since there could be many possibilities and you don not want/can not use
regexp, this might be a good solution.
Now we have to setup this goal at your Google Analytics account like this:
I test such scenarios with simple console calls - so if you just want test it - setup your goal and copy paste those GA-events.
Here you can read more about it at Google docs.