-
Similar Content
-
By battles
I'm trying out an affiliate program and it needs some custom JS added to the home page and to the thank you page:
Tracking Visitors
To track visitors, copy and paste the following code just above </body> on your website.
Tracking Purchases
Tracking purchases can be accomplished by adding the following javascript on your Thank You page.
I'm relatively sure that I will add the Purchade script to: /templates/orderforms/cart/complete.tpl
Where would the visitor tracking go?
Also it needs to be wrapped in - {literal} {/literal} , correct?
Is there a custom js file I should add and call so it doesn't get overwritten by updates?
-
By Andreas H
Hello.
Just a quick question: Where and how can I change the {$versionHash} of my header files?
I can't seem to update the files without changing the hash.
E.G: <script src="{$WEB_ROOT}/templates/{$template}/assets/js/main.js?v={$versionHash}"></script>
Thanks,
Andreas.
-
By krokos
Hello, I need to add an IF...ELSE statement in a javascript file so an alternative snippet of code will be executed depending on the language.
For example,
if ($language = "Greek") { // block of code to be executed if the condition is true } else { // block of code to be executed if the condition is false } I tried it like that but it is not working. Any hints?
-
By inteldigital
Hi,
How do I go about implementing Hotjar's javascript into WHMCS? I'm assuming I cannot just add it into the header.tpl of my theme (Hexa) as it breaks the theme. Here's the code:
<!-- Hotjar Tracking Code for https://billing.inteldigital.co.uk --> <script> (function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid:,hjsv:}; a.appendChild(r); })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv='); </script> I've tried using {literal} too, which parses the theme, but it doesn't call the JS. Assuming this is what it's purpose is, so what's the solution?
-
By startover909
I'm on WHMCS 7.5.1. I noticed that the site places a single, minified js file, scripts.min.js, in its header:
<script type="text/javascript"> var csrfToken = '{$token}', markdownGuide = '{lang key="markdown.title"}', locale = '{if !empty($mdeLocale)}{$mdeLocale}{else}en{/if}', saved = '{lang key="markdown.saved"}', saving = '{lang key="markdown.saving"}', whmcsBaseUrl = "{\WHMCS\Utility\Environment\WebHelper::getBaseUrl()}"; </script> <script src="{$WEB_ROOT}/templates/{$template}/js/scripts.min.js?v={$versionHash}"></script> I'm just wondering if it's safe to move this section to the footer so it does not "render block"? Just tried it on a site under development and seems fine so far at first glance. I wonder if others did the same and if this can potentially cause some issues for WHMCS.
Thanks.
-
-
Recently Browsing 0 members
No registered users viewing this page.