This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
/** | |
* Data layer pushes should always have an event (even in simple <head> snippets). | |
* But if you're dealing with an event-less push upon which you need to be able | |
* to fire a Trigger, and you cannot change the push snippet, this code will | |
* let you detect the push and add an event dynamically. | |
* | |
* Tested in Chrome, Firefox, and IE9. | |
*/ | |
(function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
/** | |
* This script facilitates cross-domain tracking when one site is runs | |
* GA Universal and another runs legacy GA (Traditional or Async/Classic). | |
* | |
* This integration currently unilateral, working only for users | |
* navigating from Universal > Legacy. For example: if a user clicks | |
* on a paid ad and lands directly on your asset/platform (legacy), | |
* then goes to your main site (UA), then clicks back to your asset/platform | |
* and converts, it will be tracked as two users: one that bounced from a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Configure WP's PHP mailer to send emails from a SMTP account. | |
* Intended to be used as callback for action `phpmailer_init`. | |
* @see https://codex.wordpress.org/Plugin_API/Action_Reference/phpmailer_init | |
* @param PHPMailer &$phpmailer The PHPMailer instance, passed by reference. | |
* @version 0.2.1 | |
*/ | |
function pfx_wp_email_config( $phpmailer ){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
SIMPLEST USAGE: | |
Copy all this code and paste it in the console to see all the data layer's available data | |
in different formats, and learn about the data layer queue vs data layer state. | |
USAGE: | |
// See data layer state as nested objects. | |
datalayerGetAll( dataLayer ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
seer_html_social_share_links( array( | |
'url' => THE URL TO SHARE, // The URL to share | |
'text' => '', // Default share text | |
'image' => IMAGE URL, // URL of the image for the share | |
//'text_before' => '', // The text to show before the buttons | |
//'text_after' => '', // The text to show after the buttons | |
'class' => '', // HTML wrapper class(es) | |
'_use_the_post' => false, // If true, uses Wordpress functions to populate default options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**### General - Full-Width Content ###*/ | |
.gtm-container-page-content-wrapper { | |
max-width: none; | |
} | |
/** fix width of folder select box column **/ | |
.gtm-folder-card col[width="4%"]:nth-of-type(1) { width: 2.5% !important } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Created by stephen on 3/12/15. */ | |
'use strict'; | |
/** | |
* Convenience function for hardocding multiline strings, without needing use explicit "\n" and concatenate lines. | |
* @param {function} fn - A function with a block comment as it's entire definition. Will not be executed. | |
* @return {string} The contents of the block comment in the definition of @param fn. | |
*/ | |
function HEREDOC( fn ){ | |
return fn.toString().match( /\/\*[\n\l]?([\s\S]*?)\*\//m )[1]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function(){ | |
var k, timestamp; | |
timestamp = google_tag_manager[{{Container ID}}].dataLayer.get('gtm.start'); | |
for( k in window ){ | |
if( window[k] && window[k][0] && timestamp === window[k][0]['gtm.start'] ){ | |
return k; | |
} | |
} | |
} |