On the face of it this seemed like it would be something simple to implement, and a common requirement given how important a metric it is, however after a lot of searching and work around ideas this seems to not be the case (I would like to avoid writing a custom plugin for something so basic).

Can anyone offer suggestions on how to do this simply (no hopping through meta redirects) and keep it strict? Or maybe there is a plugin I have missed? The registration system in question is using zoo_visitor and does not require email authentication.

Thank you.

2 Answers 2


Based on the comments from madebyhippo's suggestion, use the free Session add-on (http://devot-ee.com/add-ons/session-variables-plugin).

So in your generic site header template (throughout the site), have a conditional similar to:

{if logged_out}{exp:session_variables:set name="registration" value="no"}{/if}

Then on the page that get's shown on successful registration check this on a conditional and will prevent refresh issues.

{if logged_in}
  {if "{exp:session_variables:get name="registration"}" == "no"}
    {exp:session_variables:set name="registration" value="yes"}
    {!-- ADD YOUR GA CODE HERE --}

Depending on your server session reset it may be possible to re-trigger if they try that "successful registration" page at a later date, but that's going to be on extreme cases.

You could even go to the further extreme of auto-submitting a user account edit form on the success page to save a custom user field and use that instead of the session variable.


An Obvious thought would be to put a Google click track on the registration button? Since users can only register once, this would do the job wouldn't it?

Why do you need to track registrations via Google? Surely a count of the active members would do the same thing?

  • 1
    If the registration fails for one reason of another you would have unknowingly tracked an unsuccessful registration - which in essence isn't a registration. Working with web marketers - they don't want to have to head off to the CMS for 1 metric, and more importantly can't use the data in GA's advanced segments.
    – Andy White
    Apr 26, 2013 at 10:55
  • OK - what about successful registrants go to a specific page which is only accessible after successful registration. This page can have a log/action on it. Then any reference in the GA for this special page can be considered a successful registration. Apr 26, 2013 at 11:01
  • Yep ideal, sort of in place already, but the user can refresh or navigate away and go back tot hat page. I dont see a way of preventing the GA code from firing again. Need a flag in the db really - back to custom plugin sigh
    – Andy White
    Apr 26, 2013 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.