User Tools

Site Tools


adminsnippets

CB Split - Admin - Content > Snippets

Recurring html or code elements can easily be included into pages or layouts using snippets. Originally added as a place to put java script and other code that would typically break the template engine used by the pages module, but useful also in placing common recurring code in one place making it easy to edit across all pages easily.

Examples:

  • Footer Code
  • Header Code
  • Tracking Pixels ( with or without logic conditions )
  • Quiz Code

Snippets can have Logical arguments based on post variables being present. This could be useful if you wanted to show content on a page to a specific group of people/campaign/marketing source. I see this all the time where a website will have 10 versions of a page, one for yahoo, google, facebook, hasoffers, etc. Using snippets and Logic you could avoid this altogether, make sure you mark pages as no-index for googlebot if you are using logic as google might decide you are cloaking and get upset with you.

Marketing Pixels/Tracking Pixels provided to you by advertisers to be placed onto your site have the undesireable side effect of telling your advertiser EVERYTHING about your traffic especially when placed site wide, using snippet logic you can load your advertisers pixel ONLY when his incoming HOP ID is present. Cool right?

Auto-Injection is basically telling a snippet to load on certain pages, without cluttering up that page with the snippet code. Auto-injected snippets will load as though they were the last line on the “Page” html.

adminsnippets.txt · Last modified: 2019/03/13 02:14 by stephan