We have simplified the process to implement your Medicom Health Risk Assessments on your organization’s website. This code includes several enhancements for your web team’s reference, which are listed below.
To implement your HRAs on your website, follow these directions:
1) Log into the Client Management Portal and within each HRA’s dashboard module, click the Embed HRA link. This will take you to the Embed page. Please note: this step will not be available until you have completed the Customization and Follow-up Plan steps for your HRA.
2) Select the preferred display mode for your HRA under the “Select App Display” section. You will be able to choose between Lightbox implementation (best practice), or a link that will open your HRA in a new page.
3) Under Select Button Display, enter the call-to-action text you want to use to launch your HRA. You will also need to select whether you want to use a button or text link to launch the HRA.
4) When you’ve updated everything to match your preferred customization, you can copy and paste the automatically generated code from the Embed Code section and place it wherever you want the HRA launch link to appear on your website.
Main Overview of Enhancements in this Code:
- When the link is clicked, this code checks the client’s page for the following Google Analytics parameters and copies them over to the profiler URL: utm_source, utm_medium, utm_campaign, utm_term, utm_content. If the parameters already exist on the profiler URL (i.e. a client manually added them), they will be left as is.
- This script watches the page for link clicks, so it will catch links that are added dynamically or via AJAX on the client’s site after the page loads. It also means the script can be included anywhere on the page (HEAD or BODY), before or after the link is included.
- The script includes its own version of jQuery and fancybox, so there shouldn’t be any problem with it conflicting with other versions of jQuery or fancybox (or any other JS) included on the client’s page.
- The script is loaded with the async attribute, so it won’t block rendering or any other external downloading (so again, it can be added anywhere on the page without affecting page load performance).
- The script protects itself from being included more than once. If you add it to the page more than once, it will still work as expected.
- The script is hosted on a Content Delivery Network (CDN) and is only 40KB minified/zipped, so it should load quickly on clients’ sites.