- Posts: 7
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Add custom JavaScript to a specific question page
- steveleathers
- Topic Author
- Offline
- New Member
Less
More
9 years 10 months ago #107957
by steveleathers
Add custom JavaScript to a specific question page was created 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
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
The topic has been locked.
- steveleathers
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
9 years 10 months ago #107958
by steveleathers
Replied by steveleathers on topic Add custom JavaScript to a specific question page
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?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
9 years 10 months ago #107964
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Add custom JavaScript to a specific question page
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.
The topic has been locked.
- steveleathers
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
9 years 10 months ago #108014
by steveleathers
Replied by steveleathers on topic Add custom JavaScript to a specific question page
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.
The topic has been locked.