Community Forum

If you have questions about my software, chances are this forum has the answers.

You'll need to register before you can post on the forum to ask your question or to answer another one. A reply will be posted to each and every question that is asked so there is no need to double post or bump your post. I do my best to answer promptly but in some cases it may take a day or two. If you bump your post, it may be removed. Bear with me and I`ll get your question answered quickly.

Here are a few tips to help you to get your questions answered more rapidly.

IMPORTANT: Posts in English only. I don't have a translator and I'll be unable to understand your message properly and will probably delete it.
SEARCH: Use the search option to see if your question has been answered on the forum before now or if there is an answer in the documentation of your software.
PRIORITY SUPPORT: If you have purchased a commercial version of any software, using the contact option at the licence centre ensures a faster response.
AUTO DELETION: Accounts older than 5 days, with no posts or topics, are automatically deleted. Only register if you are thinking of posting.
LINKS: Any links posted are not clickable and must be copied / pasted into your browser address bar.

You are not logged in.

#1 bphupscher 07-12-2017 00:27:16

Hi,

In my 2.1 installation, i had some tracking codes (javascript I think) That worked for google analytics, piwik and "chcounter". the google and chcounter i would like to have working properly in the new website..
I had put them in footer.tpl.php in 2.1 site

Anyone know if there a place where I should best try to put these codes?

The codes also try to get the (SEO) url and page title too for the counter(s)

// <![CDATA[
// chCounter
// settings:
cstatus = "active";
visible = "1";
page_title = "<?php echo $this->TITLE; ?>";
url_of_counter_file = "http://www.de-digitale-bemoediging.nl/counter/counter.php";

////////////////
page_url = unescape( location.href );
referrer = ( document.referrer ) ? document.referrer : "";
page_title = ( page_title.length == 0 ) ? document.title : page_title;
document.write( "<script type=\"text/javascript\" src=\"" );
document.write( url_of_counter_file + "?chCounter_mode=js&amp;jscode_version=3.1.3&amp;status=" + cstatus + "&amp;visible=" + visible + "&amp;page_title=" + encodeURIComponent( page_title ) );
document.write( "&amp;page_url=" + encodeURIComponent( page_url ) + "&amp;referrer=" + encodeURIComponent( referrer ) + "&amp;res_width=" + screen.width + "&amp;res_height=" + screen.height + "\"><" + "/script>" );
// ]]>
</script>
<noscript>
 <object data="http://www.de-digitale-bemoediging.nl/counter/counter.php?chCounter_mode=noscript" type="text/html"></object>
</noscript></td>
        <td align="center" valign="top" style="border-top:1px solid #68A7DA;border-bottom:1px solid #68A7DA;padding:5px;"  class="header">
</td>
    </tr>
    </table>
</div>
</div>

<!-- Piwik -->
<a href="http://piwik.org" title="Web analytics" onclick="window.open(this.href);return(false);">
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://www.de-digitale-bemoediging.nl/piwik/" : "http://www.de-digitale-bemoediging.nl/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
<!--
piwik_action_name = document.title;
piwik_idsite = 1;
piwik_url = pkBaseURL + "piwik.php";
piwik_log(piwik_action_name, piwik_idsite, piwik_url);
//-->
</script><object>
<noscript><p>Web analytics <img src="http://www.de-digitale-bemoediging.nl/piwik/piwik.php" style="border:0" alt="piwik"/></p>
</noscript></object></a>
<!-- /Piwik --> 

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>

<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-*********-**");
pageTracker._initData();
pageTracker._trackPageview();
</script>

http://www.de-digitale-bemoediging.nl/counter/counter.php

#2 msworld 09-12-2017 03:58:43

I had put them in footer.tpl.php in 2.1 site

Do the same in 3.0, add the code to the footer.tpl.php template file.

#3 bphupscher 22-12-2017 17:35:14

Thank you, it works.
(I had to update a bit in this script to get it working again, <?php echo $this->TITLE; ?> to get the title to my counter had to be changed (which I found the correct format in header tpl smile )

#4 msworld 23-12-2017 17:23:45

Glad you got it working. smile

Board footer

Maian Script World - Free PHP Software for Personal or Business Use.
© 2003-2018 Maian Script World & David Ian Bennett.

2Checkout.com is an authorized reseller of goods and services provided by Maian Script World

Free PHP Software / Responsive PHP Scripts / Lightweight PHP Software / White Label PHP Software