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
    
  
  
    
  | ln -s /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code /usr/local/bin/code | 
  
    
      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
    
  
  
    
  | /* Pixel events https://developers.facebook.com/docs/ads-for-websites/pixel-events/v3.1 | |
| * fbq('track/trackCustom', 'eventName', {customData}); | |
| * ViewContent / Search / AddToCart etc... | |
| */ | |
| // this | |
| fbq( 'trackCustom', 'linkClick', {{getFBEventData}} ); | 
  
    
      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
    
  
  
    
  | <!-- Facebook Pixel Code --> | |
| <script> | |
| !function(f,b,e,v,n,t,s) | |
| {if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
| n.callMethod.apply(n,arguments):n.queue.push(arguments)}; | |
| if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; | |
| n.queue=[];t=b.createElement(e);t.async=!0; | |
| t.src=v;s=b.getElementsByTagName(e)[0]; | |
| s.parentNode.insertBefore(t,s)}(window, document,'script', | |
| 'https://connect.facebook.net/en_US/fbevents.js'); | 
  
    
      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
    
  
  
    
  | /* build custom FB event data (object) | |
| * and then return it | |
| */ | |
| function(){ | |
| return { | |
| 'content_category' : {{getLinkClickCategory}}, | |
| 'content_name' : {{getLinkClickAction}}, | |
| 'content_action' : {{getLinkClickAction}}, // I decided that `name` = `action` for consistency with GA events. and send the data anyway although it's duplicate | |
| 'content_label' : {{getClickUrlWithoutParam}} | |
| }; | 
  
    
      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
    
  
  
    
  | // example "subdomain.ilman.co".match(/[^.]*\.[^.]{2,3}(?:\.[^.]{2,3})?$/) | |
| // will returns "ilman.co" | |
| function() | |
| { | |
| return {{Page Hostname}}.match(/[^.]*\.[^.]{2,3}(?:\.[^.]{2,3})?$/)[0]; | |
| } | 
  
    
      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() { | |
| if ({{destinationHostname}}.indexOf({{pageDomainName}}) === -1) { | |
| return true; | |
| } | |
| return false; | |
  
    
      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
    
  
  
    
  | // removes URL part after '?' sign in a url | |
| function(){ | |
| return {{Click URL}}.split('?')[0]; | |
| } | 
  
    
      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
    
  
  
    
  | /* returns linkClickAction types. Possible values are: | |
| * Online Booking | |
| * Phone Call | |
| * Internal Link | |
| * destinationHostname (for outbound links) | |
| */ | |
| function(){ | |
| if ( {{destinationHostname}}.includes( {{Calendar Service Hostname}} ) ) | |
| { | 
  
    
      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
    
  
  
    
  | /* Get possible link click categories. Return values are: | |
| * Internal Link Click | |
| * Outbound Link Click | |
| * Contact Phone | |
| */ | |
| function(){ | |
| if ( {{isOutboundClick}} ) | |
| { | |
| return 'Outbound Link Click'; | 
  
    
      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
    
  
  
    
  | /* | |
| taken from http://dmitriilin.com/storages-cookies-in-google-tag-manager/ | |
| * Type – define the type of the storage you want to use, local or session. | |
| * Name – name of the item | |
| * Value – item’s value | |
| USAGE | |
| // create an item in sessionStorage | |
| {{variable_name}}('session','item_name', 'item_value'); | 
NewerOlder