Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
:)

Shabbir Bhimani shabbirbhimani

💭
:)
View GitHub Profile
@shabbirbhimani
shabbirbhimani / cb-thanks.php
Last active Oct 22, 2019
Tracking Clickbank Sales into Google Analytics E-Commerce
View cb-thanks.php
<?php
$cb_item=$_REQUEST['item'];
$cb_affiliate=$_REQUEST['cbaffi'];
$cb_receipt=$_REQUEST['cbreceipt'];
$cb_cname=$_REQUEST['cname'];
$cb_cemail=$_REQUEST['cemail'];
$cb_ccountry=$_REQUEST['ccountry'];
$net_amount = 19.97;
if($cb_affiliate!='0') $net_amount = 0.3*$net_amount;
View vBulletin.php
<?php
require_once(‘./global.php’);
$blogs = $db->query_read_slave(“SELECT blogid FROM ” . TABLE_PREFIX . “blog WHERE state = ‘visible'”);
while ($blog = $db->fetch_array($blogs))
{
if($blog[‘blogid’]==0) continue;
$sql = “INSERT INTO ” . TABLE_PREFIX . “thread (title, forumid, postusername,postuserid,dateline,views) SELECT title, 38, username, userid,dateline,views from “.TABLE_PREFIX.”blog where blogid=$blog[blogid]”;
$db->query_write($sql);
View validate-email.js
<script language="JavaScript">
<!--
function _submit_form(frm)
{
var email = frm.email.value;
var valid_email = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
if( valid_email.test( email ) )
{
document.getElementById('before').style.display = 'none';
document.getElementById('after').style.display = 'block';
View thanks.html
<div id="after" style="width:99%;border:gray 1px solid;display:none;background-color:#ccc;Padding:5px;height:100px;">Thank you</div>
View iframe.html
<iframe id="AweberFormSubmitFrame" style="display: none" name="AweberFormSubmitFrame" src="about:blank"></iframe>
<form id="before" target="AweberFormSubmitFrame" ...
View iframe.html
<iframe id="AweberFormSubmitFrame" style="display: none" name="AweberFormSubmitFrame" src="about:blank"></iframe>
@shabbirbhimani
shabbirbhimani / vBulletin.htaccess
Created Oct 8, 2019
vBulleting htaccess to Compress Output (GZIP)
View vBulletin.htaccess
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
# file-types indicated will not be compressed
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|rar|zip|pdf)$ no-gzip dont-vary
<IfModule mod_headers.c>
Header append Vary User-Agent
</IfModule>
</IfModule>
@shabbirbhimani
shabbirbhimani / analytics.js
Created Jul 9, 2019
Google Analytics Code for Sending an interactive even after 1 minute
View analytics.js
setTimeout(function(){ga('send', 'event', 'timeOnSite', '60Seconds', window.location.href, 1)}, 60000);
@shabbirbhimani
shabbirbhimani / ga.js
Created Jul 9, 2019
Legacy Google Analytics Code to Send an Event Update after 60 Seconds
View ga.js
setTimeout(function(){_gaq.push(['_trackEvent', 'timeOnSite', '60 seconds', window.location.href])}, 60000);
@shabbirbhimani
shabbirbhimani / analytics.js
Created Jun 28, 2019
Google Analytics Code to Sent Interative Event After 60 Seconds
View analytics.js
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXX-XX', 'XXXXXXXX.COM');
ga('send', 'pageview');
setTimeout(function(){ga('send', 'event', 'timeOnSite', '60Seconds', window.location.href, 1)}, 60000);
</script>