Check out the LimeSurvey source code on GitHub!

Add custom JavaScript to a specific question page

More
2 years 8 months ago #107957 by steveleathers
Hi,

I'm wondering if it's possible to add a Javascript code snippet to a specific question page.

I'd like to track conversions from a facebook ad to a point about 80% of the way through a survey.

This means inserting a specific code snippet in the JS template, but I only want the code to appear on one instance. Is this doable?

Thanks.
-Steve

Please Log in to join the conversation.

More
2 years 8 months ago #107958 by steveleathers
Alternatively, is there a way to create a new template file that is not included throughout the survey, but only added if certain conditions are met?

Please Log in to join the conversation.

More
2 years 8 months ago #107964 by tpartner
Instead of adding the code to a template file, simply add it to the source of any question on that page.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
2 years 8 months ago #108014 by steveleathers
Unfortunately, the Facebook JS code will only be recognized it it's included in the <head>, so including it in the question source or the Survey Completed template doesn't work. :(

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form