Passing SubIDs to the Comparison tool.
You can pass a SubID to the comparison tool by using SubID 1. The other SubIDs are already in use for other purposes.
Sometimes it is convenient for publishers to dynamically fill in SubIDs. Below we describe how to do this. There are two methods. For some tools, the tool automatically captures the SubID if you add ?dai_ref=subID` to the link.
For example: https://vergelijkers.daisycon.com/energievergelijker?dai_ref=test123
If you change "test123" to another word, you will see that this word is added to the SubID in the comparison tool (after "ws=" in the link in the comparison tool).
New to SubIDs? Read here how to set up Sub ID's.
There is also another method, which requires some programming knowledge.
The code you receive from the generators on the website all contain a variable for a SubID. Based on the form, a value is filled in here, but it is also possible to insert your own code.
For example, you could use JavaScript to fill in what the referrer is, or of course, write a check for this. You could do this with `document.referrer`. For the Telecom Comparison tool, two examples have been worked out:
Using PHP:
<div class="mobile-comparator-wrapper" data-mediaid="22848" data-subid="<?php echo $_GET['subid']; ?>" data-entry="10" data-provider="0" data-4g="0" data-duration="0" data-renewal="0" data-filter_view="1" data-programs="all" data-basicColor="3498DB" data-actionColor="FF8201" data-button_text="Bekijken" data-maxMob="1000" data-minMin="100" data-minInt="200" data-maxAb="100" data-mobiles="all" data-v="2"></div>
Using JavaScript / jQuery:
<!-- Don't forget to add jQuery to the head of your website or at least above the following script. -->
<script>
// Library to get URL parameters like &subid=value
jQuery.urlParam = function(name){var results = new RegExp('[\?&]'+name+'=([^&#]*)').exec(window.location.href);if (results==null){return null;}else{return results[1] || 0;}}
jQuery(document).ready(function(){
jQuery(".mobile-comparator-wrapper").attr("data-subid", jQuery.urlParam('subid'));
});
</script>
<!-- Scripts and Stylesheet hier -->
<div class="mobile-comparator-wrapper" data-mediaid="22848" data-subid="" data-entry="10" data-provider="0" data-4g="0" data-duration="0" data-renewal="0" data-filter_view="1" data-programs="all" data-basicColor="3498DB" data-actionColor="FF8201" data-button_text="Bekijken" data-maxMob="1000" data-minMin="100" data-minInt="200" data-maxAb="100" data-mobiles="all" data-v="2"></div>