{"id":28,"date":"2013-02-27T03:54:34","date_gmt":"2013-02-27T03:54:34","guid":{"rendered":"http:\/\/digitaldatatactics.com\/?p=28"},"modified":"2015-08-22T16:06:34","modified_gmt":"2015-08-22T16:06:34","slug":"sitecatalyst-implementation-series-breaking-up-with-sitecatalyst-plugins","status":"publish","type":"post","link":"https:\/\/www.digitaldatatactics.com\/index.php\/2013\/02\/27\/sitecatalyst-implementation-series-breaking-up-with-sitecatalyst-plugins\/","title":{"rendered":"SiteCatalyst Implementation Series: Breaking up with SiteCatalyst plugins"},"content":{"rendered":"<p><em>Cross-post: I originally published this on <a href=\"http:\/\/www.searchdiscovery.com\/blog\/sitecatalyst-processing-rules-are-not-a-tms\/\">SearchDiscovery\u2019s blog<\/a> in\u00a0February\u00a02013.<\/em><\/p>\n<p>We\u2019ve all had a love\/hate relationship with our SiteCatalyst plugins. I mean, where would we be today without good ol\u2019 s.getQueryParam or s.getTimeParting? And when you have a new tracking parameter from your marketers, who doesn\u2019t love to get your developers and implementation consultants to change and test those fateful lines in the doplugins section?\u00a0But it\u2019s time to move on. Technology has finally caught up to our needs. Plugins you previously couldn\u2019t have lived without are now obsolete, since their functionality is built right into the Satellite interface.<\/p>\n<p>I\u2019ll admit, when Rudi Shumpert posted about how to get a <a title=\"SiteCatalyst Implementation Series \u2013 SiteCatalyst Base Code\" href=\"http:\/\/www.searchdiscovery.com\/satellite\/blog\/sitecatalyst-implementation-series-sitecatalyst-base-code\/\">SiteCatalyst Base Code (scode) into Satellite<\/a>\u00a0before I started working here,\u00a0I thought \u201cwell, it will be nice to be able to manage\/make changes to the scode right within the satellite interface, but Rudi left off a pretty critical piece- plugins! That\u2019s where all the hard work is, anyways.\u201d That plain little s_code you get from the admin console doesn\u2019t include any plugins- yet somehow pretty much every scode on the web includes lines and lines of plugin code. You can\u2019t live without them! Or at least, you couldn\u2019t in the past. But Rudi and Satellite were already a few steps ahead of me.<\/p>\n<p>Where did all those s_codes get their plugin code? Some can be found in the SiteCatalyst knowledge base documentation, some can be found smattered across the web on various blogs (I can\u2019t tell you how often I\u2019ve referred clients to<a title=\"Kevin Roger's plugin blog\" href=\"http:\/\/webanalyticsland.com\/sitecatalyst-plugins\">Kevin Rogers<\/a> and<a title=\"Jason Thompson's implementation blog\" href=\"http:\/\/emptymind.org\/category\/digital-analytics\/implementation\/\"> Jason Thompson<\/a>\u2018s blogs). Either way, you need someone familiar with the plugins, their use-cases, and their gotchas, to implement them for you: the Implementation Consultants.\u00a0As someone who has made a living for 6 years as an scode jockey, I can tell you that while there is always plenty of s_code work to keep an IC busy, we\u2019d much rather focus our efforts on streamlining processes, create better governance and standards, and helping bring in data that \u00a0can really change the way an\u00a0organization\u00a0does digital business.<\/p>\n<p>Now that I\u2019ve had more of a chance to work with Satellite, I see Rudi wasn\u2019t wrong to omit plugins in his post: he just knows that with Satellite, you may simply just not need them! Take getQueryParam for example.<\/p>\n<h2 id=\"queryparamtrackingtheoldway\">Query Param Tracking \u2013 The Old Way<\/h2>\n<p>In the past, if I used a query string parameter, such as \u201ccid\u201d, \u201ccmpid\u201d, or \u201csource\u201d, in my marketing URLs to track campaigns, I\u2019d need to include this in my s<em>code in the s<\/em>doPlugins function:<\/p>\n<pre>s.campaign=s.getQueryParam('cid');<\/pre>\n<p>Then in my plugins section, I\u2019d need to include the whole getQueryParam plugin (hopefully the most recent version, which is currently 2.3).<\/p>\n<pre>\/* * Plugin: getQueryParam 2.3 *\/ s.getQueryParam=new Function(\"p\",\"d\",\"u\",\"\" +\"var s=this,v='',i,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.locati\" +\"on);if(u'f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i&lt;0?p\" +\".length:i;t=s.p<em>gpv(p.substring(0,i),u+'');if(t){t=t.indexOf('#')&gt;-\" +\"1?t.substring(0,t.indexOf('#')):t;}if(t)v+=v?d+t:t;p=p.substring(i=\" +\"=p.length?i:i+1)}return v\"); s.p<\/em>gpv=new Function(\"k\",\"u\",\"\" +\"var s=this,v='',i=u.indexOf('?'),q;if(k&amp;&amp;i&gt;-1){q=u.substring(i+1);v\" +\"=s.pt(q,'&amp;','p<em>gvf',k)}return v\"); s.p<\/em>gvf=new Function(\"t\",\"k\",\"\" +\"if(t){var s=this,i=t.indexOf('='),p=i&lt;0?t:t.substring(0,i),v=i&lt;0?'T\" +\"rue':t.substring(i+1);if(p.toLowerCase()k.toLowerCase())return s.\" +\"epa(v)}return ''\");<\/pre>\n<p>Now you\u2019d wait for developers to test it, and\/or for the next code release cycle. Not exactly the most clear-cut solution for something so simple, is it? In truth, this is probably the easiest, most simple plugin you can implement in your s_code. And if you wanted to keep it in your s_code, you still could, and manage it within Satellite to keep it easy to manage and control.<\/p>\n<h2 id=\"queryparamtrackingthenewway\">Query Param Tracking -The New Way<\/h2>\n<p>Now, you can accomplish the exact same purpose with a few keystrokes and a mouse click. In either your page rules (to apply to only a subset of pages) or your overall tool settings (to apply site-wide), you\u2019ll find the campaign variable :<\/p>\n<p><a href=\"http:\/\/www.searchdiscovery.com\/images\/blog\/2013\/02\/SC-campaign-tracking-sat.png\"><img decoding=\"async\" title=\"\" src=\"http:\/\/www.searchdiscovery.com\/images\/blog\/2013\/02\/SC-campaign-tracking-sat.png\" alt=\"set up campaign tracking in one click\" \/><\/a><\/p>\n<p>Done! Yep, that\u2019s it.<\/p>\n<h2 id=\"additionaluses\">Additional Uses<\/h2>\n<p>If you need to capture different query string parameters into different variables \u2013 for example, an internal promotion into <em>?icid<\/em> \u2013 this is done with one additional step: the creation of a simple data element (under \u201crules\u201d then \u201cdata elements\u201d). Give it a friendly name for the satellite interface, select \u201cURL Parameter\u201d under type, enter the parameter, and save.<\/p>\n<p><a href=\"http:\/\/www.searchdiscovery.com\/images\/blog\/2013\/02\/query-param-data-element.png\"><img decoding=\"async\" title=\"\" src=\"http:\/\/www.searchdiscovery.com\/images\/blog\/2013\/02\/query-param-data-element-252x300.png\" alt=\"Creating a data element from a query string parameter\" \/><\/a><\/p>\n<p>All that\u2019s left to be done is to call that data element in the eVar itself. This can be done site wide (in your tool settings) or for a specific page or subset of pages- either way, the set up is the same and very simple. I set the eVar number, type \u201c%\u201d to let Satellite know I am calling a data element, choose my already-created element from the list, and hit save:<\/p>\n<p><a href=\"http:\/\/www.searchdiscovery.com\/images\/blog\/2013\/02\/query-param-data-element-into-evar.png\"><img decoding=\"async\" title=\"\" src=\"http:\/\/www.searchdiscovery.com\/images\/blog\/2013\/02\/query-param-data-element-into-evar-300x157.png\" alt=\"Adding the data element to an eVar.\" \/><\/a><\/p>\n<p>I save my rule or my settings, test it, and publish it- a process that could be completed in as few as 5 minutes. Done. No code touched. The s_code file is still that basic, plain s_code straight from the admin console.<\/p>\n<h2 id=\"conclusionandnextsteps\">Conclusion and Next Steps<\/h2>\n<p>Obviously this is a very simple (if very common) use case. I\u00a0implemented both campaign and internal promotions on my own site in under 15 minutes. I\u2019ll be following this post by looking at other plugins that Satellite can free you from, including the linkhandler plugins, getPreviousPageName, getAndPersistValue, appendToList, Form Analysis, and forceLowercase plugins.<\/p>\n<p>Are you ready to move on? Which plugins are you ready to leave behind?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cross-post: I originally published this on SearchDiscovery\u2019s blog in\u00a0February\u00a02013. We\u2019ve all had a love\/hate relationship with our SiteCatalyst plugins. I mean, where would we be today without good ol\u2019 s.getQueryParam or s.getTimeParting? And when you have a new tracking parameter from your marketers, who doesn\u2019t love to get your developers and implementation consultants to change &#8230; <a title=\"SiteCatalyst Implementation Series: Breaking up with SiteCatalyst plugins\" class=\"read-more\" href=\"https:\/\/www.digitaldatatactics.com\/index.php\/2013\/02\/27\/sitecatalyst-implementation-series-breaking-up-with-sitecatalyst-plugins\/\" aria-label=\"Read more about SiteCatalyst Implementation Series: Breaking up with SiteCatalyst plugins\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,7],"tags":[8,12],"_links":{"self":[{"href":"https:\/\/www.digitaldatatactics.com\/index.php\/wp-json\/wp\/v2\/posts\/28"}],"collection":[{"href":"https:\/\/www.digitaldatatactics.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.digitaldatatactics.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.digitaldatatactics.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.digitaldatatactics.com\/index.php\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":1,"href":"https:\/\/www.digitaldatatactics.com\/index.php\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":29,"href":"https:\/\/www.digitaldatatactics.com\/index.php\/wp-json\/wp\/v2\/posts\/28\/revisions\/29"}],"wp:attachment":[{"href":"https:\/\/www.digitaldatatactics.com\/index.php\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.digitaldatatactics.com\/index.php\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.digitaldatatactics.com\/index.php\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}