Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On the Simplereach, for Drupal website, users need to edit node.tpl.php
and insert the code
<script type='text/javascript'>
__spr_config = {
pid: "4f1e280d396cef51de0088908",
title: "<?php echo $title; ?>",
pub: "<?php echo strftime("%F %T",$created); ?>"
};
(function(){
var s = document.createElement('script');
s.async = true;
s.type = 'text/javascript';
s.src = document.location.protocol + '//d8rk54i4mohrb.cloudfront.net/js/slide.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(s);
})();
</script>
Do we really need to edit node.tpl.php
or users can just get that PID and insert it to admin/config/srslide
PID settings input form?
Well it's confusing?
Comments
Comment #1
jarrodirwin CreditAttribution: jarrodirwin commentedBy the looks of it, once enabled on the content type (it will need to be enabled on each content type) the module automatically adds the tracking javascript about the current node to the page.
Pages that are built by views however will need the above code added to either the template or in a preprocess.
Please correct me if I am wrong?