Skip to content

Instantly share code, notes, and snippets.

Shoora Shoora

  • St. Petersburg
Block or report user

Report or block Shoora

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lightbox.js
<!-- Start lightbox test -->
<script>
//We want to track interaction via GA, but if it doesn't exist, we don't want to throw an error.
if(typeof(ga) !== 'function') {
function ga() {return false;}
}
jQuery(document).ready(function($) {
var modalOpen = false;
View Steps to Winning Featured Snippets.md
View gist:4d1d21efe12a58419e2b891d7f86726f
(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','https://www.google-analytics.com/analytics.js','ga_new');
ga_new('create', 'UA-57437536-39', 'auto');
ga_new('send', 'pageview');
jQuery(document).ready(function($) {
$('.tel a').bind('click', function() {
View google-analytics-outgoing-links
@Shoora
Shoora / server-side-google-analytics-for-sending-pageviews.php Using server-side Google Analytics for sending pageviews and event tracking
View server-side-google-analytics-for-sending-pageviews.php
//Parse the GA Cookie
function gaParseCookie() {
if (isset($_COOKIE['_ga'])) {
list($version, $domainDepth, $cid1, $cid2) = explode('.', $_COOKIE["_ga"], 4);
$contents = array('version' => $version, 'domainDepth' => $domainDepth, 'cid' => $cid1 . '.' . $cid2);
$cid = $contents['cid'];
} else {
$cid = gaGenerateUUID();
}
return $cid;
@Shoora
Shoora / Scientist.js
Created Sep 27, 2019 — forked from jasonrhodes/Scientist.js
Helper library for working with Google Analytics.
View Scientist.js
/**
* Scientist.js
*
* A small helper library for working with Google Analytics.
*
* @author Jason Rhodes
* @version 0.2
*
*/
var Scientist = function (analytics) {
View boomerang_event_tracking.js
// this is the google analytics script that we have
(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', 'its the correct number', 'auto');
ga('send', 'pageview');
View analytics.js
/**
* @class Analytics
* @author Joshua Russell <josh.russell@holler.com.au>
*
* A wrapper class for sending Google Analytics events
* https://developers.google.com/analytics/devguides/collection/analyticsjs/events
* ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue]);
*
* Usage:
* Add a data-ga to html elements to track `click` events
@Shoora
Shoora / chris-analytics.js
Created Sep 27, 2019 — forked from czenzel/chris-analytics.js
Christopher Zenzel Analytics Plug-In
View chris-analytics.js
/*
Christopher Zenzel Analytics
Advanced Analytics for Google Analytics Platform
Copyright 2016 Christopher David Zenzel
All Rights Reserved.
https://chriszenzel.com
For the purpose of this project and why certain
@Shoora
Shoora / ga.js
Created Sep 27, 2019 — forked from Asikur22/ga.js
GA Scripts #GA
View ga.js
// For analytics.js
<script>
jQuery( document ).ready(function($) {
jQuery('a[href^="tel:"]').on('click', function() {
var n = jQuery(this).attr('href').replace('tel:', '');
ga('send', 'event', 'Phone Click Tracking', n, 'Click to Call', n);
});
jQuery('a[href^="mailto:"]').on('click', function() {
var n = jQuery(this).attr('href').replace('mailto:', '');
ga('send', 'event', 'Email Click Tracking', n, 'Click to Email', n);
You can’t perform that action at this time.