Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
500 views
in Q2A Core by

I have an affiliate partnership with a website. Let’s call it [example.com]. I’d like to automatically add an affiliate parameter [?me=1234] to the URL whenever an answer with a link to [example.com] is posted. I assume this can be done with javascript, but I haven’t been able to make scripts like this one work. I get the following error, which leads me to believe I haven’t installed jQuery properly in Q2A:

Uncaught ReferenceError: jQuery is not defined
Q2A version: 1.8.3

1 Answer

+1 vote
by

I found my problem. The jQuery file has to be loaded before any script that requires it, which means it must be added to the Head in Admin. For future reference: anyone seeking an affiliate code automator, the script I linked to in my question is working for this use.

...