The only way I can think of to do that is by using ajax. What does your snippet do?
Hi Lucas,
the Snippet is a part of a A/B-Testing-Tool I developed for MODx. This snippet counts the conversions (for example how many visitors of the page-variation B click on the link) including a check if the visitor already has converted/clicked on the link before and which variation the visitor is assigned to. Afterwards the snippet will saves a value to a variable of the resource where the A/B-Test is located.
why not running the snippet on the landing-page?
That is possible, too. But if you reach the landing-page by a different way (for example by a direct type in or a deep link from another website) this can result in wrong conversion-rates. Beside this we need the onclick-way for measuring conversions which are defined by downloads of pdfs. Do you have any idea how to solve this by the onclick-method?
Letti
you can put your snippet on an extra resource and send an ajax-request to this resource by "onclick"
Thanks for your answer. Can you tell me how the ajax-request should look like? I am not sure how to do this. Would be great.
Thanks a lot!
Letti