To add Google Analytic tracking to outbound links on the job page.
Changes
Added a function to the html to track outbound links that call it on click.
Changed the Job model to use a RawHTML field instead of a RichTextField. This will let you directly alter the links in 'Apply' section of the job description.
Added migrations to help change the data to JSON. That way previous text shouldn't have to be changed.
Additional
This fix only changes the structure of the model in preparation for Google Analytics to be added to links. In order for it to be added to links, someone with Admin access will have to change the links to have an onclick function like this:
<a href="http://www.example.com" onclick="trackOutboundLink('http://www.example.com'); return false;">Check out example.com</a>
This will make a call to the trackOutboundLink function and track the click in Google Analytics.
Ticket
https://openscience.atlassian.net/browse/EOSF-677
Purpose
To add Google Analytic tracking to outbound links on the job page.
Changes
Additional
onclick
function like this:<a href="http://www.example.com" onclick="trackOutboundLink('http://www.example.com'); return false;">Check out example.com</a>
This will make a call to the trackOutboundLink function and track the click in Google Analytics.