Skip to content

Instantly share code, notes, and snippets.

View shabbirbhimani's full-sized avatar
💭
:)

Shabbir Bhimani shabbirbhimani

💭
:)
View GitHub Profile
@shabbirbhimani
shabbirbhimani / cb-thanks.php
Last active October 22, 2019 14:11
Tracking Clickbank Sales into Google Analytics E-Commerce
<?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;
<?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);
<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';
<div id="after" style="width:99%;border:gray 1px solid;display:none;background-color:#ccc;Padding:5px;height:100px;">Thank you</div>
<iframe id="AweberFormSubmitFrame" style="display: none" name="AweberFormSubmitFrame" src="about:blank"></iframe>
<form id="before" target="AweberFormSubmitFrame" ...
<iframe id="AweberFormSubmitFrame" style="display: none" name="AweberFormSubmitFrame" src="about:blank"></iframe>
@shabbirbhimani
shabbirbhimani / vBulletin.htaccess
Created October 8, 2019 12:27
vBulleting htaccess to Compress Output (GZIP)
<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 July 9, 2019 07:27
Google Analytics Code for Sending an interactive even after 1 minute
setTimeout(function(){ga('send', 'event', 'timeOnSite', '60Seconds', window.location.href, 1)}, 60000);
@shabbirbhimani
shabbirbhimani / ga.js
Created July 9, 2019 07:21
Legacy Google Analytics Code to Send an Event Update after 60 Seconds
setTimeout(function(){_gaq.push(['_trackEvent', 'timeOnSite', '60 seconds', window.location.href])}, 60000);
@shabbirbhimani
shabbirbhimani / analytics.js
Created June 28, 2019 06:42
Google Analytics Code to Sent Interative Event After 60 Seconds
<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>