Skip to content

Instantly share code, notes, and snippets.

@efrister
Created October 15, 2013 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save efrister/6998514 to your computer and use it in GitHub Desktop.
Save efrister/6998514 to your computer and use it in GitHub Desktop.
More complex example of wrapping for javascript
################################################
# VHS
# Omniture Tracking
#
plugin.tx_vhs.settings.asset {
# Omniture Tracking
# Account Setting and loading of registers
omniture_saccount {
name = omniture_saccount
type = js
group = omniture
content (
var s_account="{register:omnitureSuiteCountry},{register:omnitureSuiteRegion}";
)
dependencies = requiredmodules
stdWrap {
insertData = 1
# Load Register for the whole of Omniture
preCObject = LOAD_REGISTER
preCObject {
# Load SiteCatalyst Path
siteCatalystPath {
postUserFunc = Namespace\Project\Service\SiteCatalyst->generatePath
postUserFunc {
base = {$const.adobe.base}
masterLanguageIdentifier = {$const.adobe.masterLanguageIdentifier}
}
}
# Channel
siteCatalystChannel < .siteCatalystPath
siteCatalystChannel.postUserFunc {
maxLength = 2
}
# Suite
omnitureSuiteCountry {
# @see Plugin/Vhs/OmnitureSuiteCountry.ts
}
##
# Regional
# SCEA Regional DEV = snestoreregdev
omnitureSuiteRegion {
override = snestoreregdev
}
# Terr-Country-Lang
omnitureTerritory {
# @see Plugin/Vhs/OmnitureTerritory.ts
}
}
}
}
# Include sen-s_code.js
omniture_scode {
name = omniture_scode
type = js
group = omniture
dependencies = omniture_saccount
path = EXT:project_template/Resources/Public/JavaScript/Adobe/Scode.js
}
# Adjust postProc Variables
omniture_postsencode {
name = omniture_postsencode
type = js
group = omniture
content (
s.pageName="{register:siteCatalystPath}";
s.channel="{register:siteCatalystChannel}";
s.linkInternalFilters="javascript:,{getIndpEnv:TYPO3_HOST_ONLY}";
s.server="sen";
s.prop72="sen";
s.eVar72="sen";
s.prop68="D=g";
s.eVar68="D=g";
s.prop71=navigator.userAgent;
s.eVar71="D=c71";
s.eVar1="D=pageName";
s.hier1="D=pageName";
s.prop2="{register:omnitureTerritory}";
s.eVar2="D=c2";
/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code=s.t();
if(s_code)document.write(s_code);
)
dependencies = omniture_scode
stdWrap {
insertData = 1
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment