Version Notes
2.0.6
UDO will now be pretty printed for readability
Added comments to code to improve long term maintainability
2.0.4
fixed one page checkout
2.0.3
Fixed warnings for REQUEST isset()
re-added page_type and page_name for order confirmation
2.0.2
Fix typos
2.0.1
Fix for extended UDO rendering blank page
2.0.0
Added external script support and refactored
1.2.0
Added UI admin toggle for onePage Checkout
1.1.1
Fixed pages not rendering
1.1.0
Added support for alternate checkout pages
1.0.2
Added html/text help to admin config
1.0.1
Fixed arrays that were rendering as strings
1.0.0
refactored based on Tealium class
added support for external UDO definition
added support for diagnostic pixel
0.4.4d
added output of diagnostic pixel
0.4.4
strip commas from all dollar values
0.4.3
fix for bad array on order page
0.4.2
added simple discount array
0.4.0
fix for individual discounts and number formats
0.3.1
fix for configurable product arrays
0.3.0
fix for missing support message
0.2.0
fix for product page tag syntax
0.1.0
initial release
Release Info
Developer | Tealium Inc. |
Extension | Tealium_Tags |
Version | 2.0.6 |
Comparing to | |
See all releases |
Code changes from version 2.0.5 to 2.0.6
- app/code/local/Tealium/Tags/Helper/Data.php +269 -112
- app/code/local/Tealium/Tags/Helper/Observer.php +29 -17
- app/code/local/Tealium/Tags/etc/LICENSE.txt +41 -0
- app/code/local/Tealium/Tags/etc/adminhtml.xml +22 -22
- app/code/local/Tealium/Tags/etc/config.xml +34 -34
- app/code/local/Tealium/Tags/etc/system.xml +1372 -793
- app/design/frontend/base/default/layout/tealium_tags.xml +108 -41
- app/design/frontend/base/default/template/tealium_tags/base.phtml +9 -5
- app/design/frontend/base/default/template/tealium_tags/catalog_product_compare_index.phtml +26 -19
- app/design/frontend/base/default/template/tealium_tags/catalogsearch_advanced_result_index.phtml +34 -19
- app/design/frontend/base/default/template/tealium_tags/catalogsearch_result_index.phtml +20 -14
- app/design/frontend/base/default/template/tealium_tags/catalogsearch_term_popular.phtml +24 -17
- app/design/frontend/base/default/template/tealium_tags/category.phtml +20 -14
- app/design/frontend/base/default/template/tealium_tags/checkout_cart_index.phtml +20 -14
- app/design/frontend/base/default/template/tealium_tags/checkout_onepage.phtml +38 -27
- app/design/frontend/base/default/template/tealium_tags/checkout_success.phtml +15 -9
- app/design/frontend/base/default/template/tealium_tags/cms.phtml +20 -14
- app/design/frontend/base/default/template/tealium_tags/customer.phtml +20 -14
- app/design/frontend/base/default/template/tealium_tags/generic.phtml +28 -24
- app/design/frontend/base/default/template/tealium_tags/guest_sales.phtml +23 -15
- app/design/frontend/base/default/template/tealium_tags/product.phtml +20 -14
- app/design/frontend/base/default/template/tealium_tags/product_send.phtml +28 -18
- app/design/frontend/base/default/template/tealium_tags/seo.phtml +20 -14
- app/design/frontend/base/default/template/tealium_tags/tag_list_index.phtml +24 -17
- app/design/frontend/base/default/template/tealium_tags/tag_product_list.phtml +23 -16
- app/etc/modules/Tealium_Tags.xml +7 -7
- lib/Tealium/Tealium.php +208 -204
- lib/Tealium/TealiumCustomData.php +117 -110
- lib/Tealium/TealiumInit.php +413 -309
- package.xml +76 -32
@@ -1,114 +1,271 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
}
|
114 |
-
|
1 |
<?php
|
2 |
+
|
3 |
+
require_once (Mage::getBaseDir('lib') . '/Tealium/Tealium.php');
|
4 |
+
|
5 |
+
/*
|
6 |
+
* Helper class for the Tealium Tags module.
|
7 |
+
* Implements basic methods for doing things such as getting module config,
|
8 |
+
* including info like account name, profile, environment, etc. Also includes
|
9 |
+
* a few other module specific utility methods.
|
10 |
+
*/
|
11 |
+
class Tealium_Tags_Helper_Data extends Mage_Core_Helper_Abstract
|
12 |
+
{
|
13 |
+
protected $tealium;
|
14 |
+
protected $store;
|
15 |
+
protected $page;
|
16 |
+
|
17 |
+
/*
|
18 |
+
* Setup the helper object so that it's ready to do work
|
19 |
+
*/
|
20 |
+
|
21 |
+
/***** #mynotes *****
|
22 |
+
* What is the need to pass by reference?
|
23 |
+
*/
|
24 |
+
public function init(&$store, &$page = array(), $pageType)
|
25 |
+
{
|
26 |
+
// initialize basic profile settings
|
27 |
+
$account = $this->getAccount($store);
|
28 |
+
$profile = $this->getProfile($store);
|
29 |
+
$env = $this->getEnv($store);
|
30 |
+
|
31 |
+
$data = array(
|
32 |
+
"store" => $store,
|
33 |
+
"page" => $page
|
34 |
+
);
|
35 |
+
|
36 |
+
$this->store = $store;
|
37 |
+
$this->page = $page;
|
38 |
+
$this->tealium =
|
39 |
+
new Tealium($account, $profile, $env, $pageType, $data);
|
40 |
+
|
41 |
+
return $this;
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
public function addCustomDataFromSetup(&$store, $pageType)
|
46 |
+
{
|
47 |
+
/***** #mynotes *****
|
48 |
+
* the "$data" variable is referenced in the custom UDO
|
49 |
+
* definition file
|
50 |
+
*/
|
51 |
+
$data = array(
|
52 |
+
"store" => $this->store,
|
53 |
+
"page" => $this->page
|
54 |
+
);
|
55 |
+
|
56 |
+
if (Mage::getStoreConfig('tealium_tags/general/custom_udo_enable', $store)) {
|
57 |
+
// To define a custom udo, define the "$udoElements" variable, which
|
58 |
+
// is an associative array with page types as keys and functions
|
59 |
+
// that return a udo for the page types as the value.
|
60 |
+
|
61 |
+
// One way to define a custom udo is to include an external file
|
62 |
+
// that defines "$udoElements"
|
63 |
+
include_once (Mage::getStoreConfig(
|
64 |
+
'tealium_tags/general/udo', $store));
|
65 |
+
|
66 |
+
// Another way to define a custom udo is to define a "getCustomUdo"
|
67 |
+
// method, which is used to set "$udoElements"
|
68 |
+
if (method_exists($this, "getCustomUdo")) {
|
69 |
+
$customUdoElements = getCustomUdo();
|
70 |
+
if (
|
71 |
+
is_array($customUdoElements) &&
|
72 |
+
self::isAssocArray($customUdoElements)
|
73 |
+
) {
|
74 |
+
$udoElements = $customUdoElements;
|
75 |
+
}
|
76 |
+
} elseif (
|
77 |
+
!isset($udoElements)
|
78 |
+
|| (
|
79 |
+
isset($udoElements)
|
80 |
+
&& !self::isAssocArray($udoElements)
|
81 |
+
)
|
82 |
+
) {
|
83 |
+
$udoElements = array();
|
84 |
+
}
|
85 |
+
|
86 |
+
// if a custom udo is defined for the page type, set the udo
|
87 |
+
if (isset($udoElements[$pageType])) {
|
88 |
+
$this->tealium->setCustomUdo($udoElements[$pageType]);
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
return $this;
|
93 |
+
}
|
94 |
+
|
95 |
+
/*
|
96 |
+
* Set custom data by updating the udo of the Tealium object belonging to
|
97 |
+
* "this" helper
|
98 |
+
*/
|
99 |
+
public function addCustomDataFromObject($udoObject)
|
100 |
+
{
|
101 |
+
if (is_array($udoObject) && self::isAssocArray($udoObject)) {
|
102 |
+
$this->tealium->updateUdo($udoObject);
|
103 |
+
}
|
104 |
+
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
|
108 |
+
/*
|
109 |
+
* Determine if an array is an associative array
|
110 |
+
*/
|
111 |
+
protected static function isAssocArray($array)
|
112 |
+
{
|
113 |
+
$keys = array_keys($array);
|
114 |
+
return array_keys($keys) !== $keys;
|
115 |
+
}
|
116 |
+
|
117 |
+
/*
|
118 |
+
* Check if the udo is enabled. Used to determine if udo javascript should
|
119 |
+
* be rendered.
|
120 |
+
*/
|
121 |
+
public function isEnabled($store)
|
122 |
+
{
|
123 |
+
return Mage::getStoreConfig('tealium_tags/general/enable', $store);
|
124 |
+
}
|
125 |
+
|
126 |
+
/*
|
127 |
+
* One Page Checkout should be explicitly enabled to render a udo on
|
128 |
+
* the page
|
129 |
+
*/
|
130 |
+
public function enableOnePageCheckout($store)
|
131 |
+
{
|
132 |
+
return Mage::getStoreConfig('tealium_tags/general/onepage', $store);
|
133 |
+
}
|
134 |
+
|
135 |
+
/*
|
136 |
+
* Returns true if an external udo is enabled. Used to override the default
|
137 |
+
* udo and allow for a customized udo.
|
138 |
+
*/
|
139 |
+
public function externalUdoEnabled($store)
|
140 |
+
{
|
141 |
+
return Mage::getStoreConfig('tealium_tags/general/custom_udo_enable', $store);
|
142 |
+
}
|
143 |
+
|
144 |
+
/*
|
145 |
+
* Return the url used to download the tag config. Rendered as part of the
|
146 |
+
* universal code snippet.
|
147 |
+
*/
|
148 |
+
public function getTealiumBaseUrl($store)
|
149 |
+
{
|
150 |
+
$account = $this->getAccount($store);
|
151 |
+
$profile = $this->getProfile($store);
|
152 |
+
$env = $this->getEnv($store);
|
153 |
+
return "//tags.tiqcdn.com/utag/$account/$profile/$env/utag.js";
|
154 |
+
}
|
155 |
+
|
156 |
+
/*
|
157 |
+
* While "this" helper provides a single interface to utility functions,
|
158 |
+
* the "tealium" object manages udo operations. This function returns
|
159 |
+
* the tealium object for times when it's useful to work with the tealium
|
160 |
+
* object directly.
|
161 |
+
*/
|
162 |
+
public function getTealiumObject()
|
163 |
+
{
|
164 |
+
return $this->tealium;
|
165 |
+
}
|
166 |
+
|
167 |
+
/*
|
168 |
+
* Return the account name, typically the client company name.
|
169 |
+
*/
|
170 |
+
public function getAccount($store)
|
171 |
+
{
|
172 |
+
return Mage::getStoreConfig('tealium_tags/general/account', $store);
|
173 |
+
}
|
174 |
+
|
175 |
+
/*
|
176 |
+
* Return the profile name. Typically "main", or often the site name
|
177 |
+
* if there are multiple profiles.
|
178 |
+
*/
|
179 |
+
public function getProfile($store)
|
180 |
+
{
|
181 |
+
return Mage::getStoreConfig('tealium_tags/general/profile', $store);
|
182 |
+
}
|
183 |
+
|
184 |
+
/*
|
185 |
+
* Return the environment. Typically "dev", "qa", or "prod".
|
186 |
+
*/
|
187 |
+
public function getEnv($store)
|
188 |
+
{
|
189 |
+
return Mage::getStoreConfig('tealium_tags/general/env', $store);
|
190 |
+
}
|
191 |
+
|
192 |
+
/*
|
193 |
+
* When overriding the default udo with a custom one, the code that
|
194 |
+
* overrides the default must live somewhere. This function returns
|
195 |
+
* the path to the file on the server in which a custom udo is defined.
|
196 |
+
*/
|
197 |
+
public function getUDOPath($store)
|
198 |
+
{
|
199 |
+
return Mage::getStoreConfig('tealium_tags/general/udo', $store);
|
200 |
+
}
|
201 |
+
|
202 |
+
/*
|
203 |
+
* When developing, it's sometimes useful to only view the rendered
|
204 |
+
* universal code snippet and udo instead of the entire page. This can
|
205 |
+
* be done by appending the query param "?tealium_api=true" to the end
|
206 |
+
* of the url in the browser. However this feature is only enabled if
|
207 |
+
* the "api_enable" config is set to true.
|
208 |
+
*
|
209 |
+
* This function returns true when the api is enabled.
|
210 |
+
*/
|
211 |
+
public function getAPIEnabled($store)
|
212 |
+
{
|
213 |
+
return Mage::getStoreConfig('tealium_tags/general/api_enable', $store);
|
214 |
+
}
|
215 |
+
|
216 |
+
/*
|
217 |
+
* Place Tealium code in external javaScript file
|
218 |
+
* NOTE Order confirmation page will always load script on page
|
219 |
+
*/
|
220 |
+
public function getIsExternalScript($store)
|
221 |
+
{
|
222 |
+
return Mage::getStoreConfig(
|
223 |
+
'tealium_tags/general/external_script',
|
224 |
+
$store
|
225 |
+
);
|
226 |
+
}
|
227 |
+
|
228 |
+
/*
|
229 |
+
* When placing the Tealium code in an external javaScript file, it's
|
230 |
+
* either loaded syncronously or asyncronously.
|
231 |
+
*
|
232 |
+
* This function returns either "async" or "sync" depending on the config.
|
233 |
+
*/
|
234 |
+
public function getExternalScriptType($store)
|
235 |
+
{
|
236 |
+
$async = Mage::getStoreConfig(
|
237 |
+
'tealium_tags/general/external_script_type',
|
238 |
+
$store
|
239 |
+
);
|
240 |
+
return $async ? "async" : "sync";
|
241 |
+
}
|
242 |
+
|
243 |
+
/*
|
244 |
+
* Sometimes it's useful to send the entire udo to a server for diagnostics.
|
245 |
+
* This function returns a tag in the form of an html <img> element that
|
246 |
+
* will send the url encoded udo to a specified server if the feature is
|
247 |
+
* enabled in the config.
|
248 |
+
*/
|
249 |
+
public function getDiagnosticTag($store)
|
250 |
+
{
|
251 |
+
if (Mage::getStoreConfig(
|
252 |
+
'tealium_tags/general/diagnostic_enable',
|
253 |
+
$store
|
254 |
+
)
|
255 |
+
) {
|
256 |
+
$utag_data = urlencode($this->tealium->render("json"));
|
257 |
+
$url = Mage::getStoreConfig(
|
258 |
+
'tealium_tags/general/diagnostic_tag',
|
259 |
+
$store
|
260 |
+
)
|
261 |
+
. '?origin=server&user_agent='
|
262 |
+
. $_SERVER ['HTTP_USER_AGENT']
|
263 |
+
. '&data='
|
264 |
+
. $utag_data;
|
265 |
+
return '<img src="' . $url . '" style="display:none"/>';
|
266 |
+
} else {
|
267 |
+
return "";
|
268 |
+
}
|
269 |
+
}
|
270 |
+
|
271 |
}
|
|
@@ -1,22 +1,34 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
2 |
class Tealium_Tags_Helper_Observer extends Mage_Core_Helper_Abstract
|
3 |
{
|
4 |
-
public function __construct()
|
5 |
-
{
|
6 |
-
}
|
7 |
-
|
8 |
-
public function apiHandler($observer)
|
9 |
-
{
|
10 |
-
if (isset($_REQUEST["tealium_api"]) && $_REQUEST["tealium_api"] == "true"){
|
11 |
-
$response = $observer->getEvent()->getFront()->getResponse();
|
12 |
-
$html = $response->getBody();
|
13 |
-
preg_match('/\/\/TEALIUM_START(.*)\/\/TEALIUM_END/is', $html, $matches);
|
14 |
-
$javaScript = "// Tealium Magento Callback API";
|
15 |
-
$javaScript .= $matches[1];
|
16 |
-
$response->setBody($javaScript);
|
17 |
-
}
|
18 |
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
-
?>
|
1 |
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This helper class is used to create pages that contain only the udo and
|
5 |
+
* other relevant Tealium code; no html. Useful for quick verification.
|
6 |
+
*/
|
7 |
class Tealium_Tags_Helper_Observer extends Mage_Core_Helper_Abstract
|
8 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
+
public function __construct()
|
11 |
+
{
|
12 |
+
// no need for extended constructor
|
13 |
+
}
|
14 |
+
|
15 |
+
public function apiHandler($observer)
|
16 |
+
{
|
17 |
+
// if the "tealium_api" parameter is set to true, set the response
|
18 |
+
// to only contain relevant Tealium logic.
|
19 |
+
if (
|
20 |
+
isset($_REQUEST["tealium_api"])
|
21 |
+
&& $_REQUEST["tealium_api"] == "true"
|
22 |
+
) {
|
23 |
+
$response = $observer->getEvent()->getFront()->getResponse();
|
24 |
+
$html = $response->getBody();
|
25 |
+
preg_match('/\/\/TEALIUM_START(.*)\/\/TEALIUM_END/is', $html, $matches);
|
26 |
+
$javaScript = "// Tealium Magento Callback API";
|
27 |
+
$javaScript .= $matches[1];
|
28 |
+
$response->setBody($javaScript);
|
29 |
+
}
|
30 |
+
|
31 |
+
return $this;
|
32 |
+
}
|
33 |
+
|
34 |
}
|
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
License Agreement
|
2 |
+
|
3 |
+
Thank You for Your interest in our Tealium Tag Management extension for Magento (the "Software"), owned and licensed by Tealium Inc. (“Tealium,” "Our," “We,” or “Us”). Please read this license agreement (the "Agreement") carefully, as it contains the terms and conditions that govern Your use of and access to the Software.
|
4 |
+
|
5 |
+
You may not access the Software if You are Our direct competitor, except with Our prior written consent. In addition, You may not access the Software for purposes of monitoring the availability, performance, or functionality, of any of our products and services or for any other benchmarking or competitive purposes.
|
6 |
+
|
7 |
+
BY DOWNLOADING THE SOFTWARE OR BY EXECUTING A TEALIUM PROVIDED ORDER FORM THAT REFERENCES THIS AGREEMENT, YOU AGREE TO BE BOUND BY AND COMPLY WITH THIS AGREEMENT. IF YOU ARE ENTERING INTO THIS AGREEMENT ON BEHALF OF A COMPANY OR OTHER LEGAL ENTITY, YOU REPRESENT THAT YOU HAVE THE AUTHORITY TO BIND SUCH ENTITY AND ITS AFFILIATES TO THIS AGREEMENT, IN WHICH CASE THE TERMS "YOU" OR "YOUR" WILL REFER TO SUCH ENTITY AND ITS AFFILIATES. IF YOU DO NOT HAVE SUCH AUTHORITY, OR IF YOU DO NOT AGREE WITH THE TERMS OF THIS AGREEMENT, YOU MUST NOT USE THE SOFTWARE.
|
8 |
+
|
9 |
+
The term of Your license to use the Software (the "Term") will begin when You accept this Agreement as set forth above and will continue until terminated pursuant to the provisions of the "Cancellation and Termination" section below. During the Term, We grant You a non-exclusive, non-transferable, royalty-free, limited license (with no right to sublicense) to use the Software to do the following:
|
10 |
+
|
11 |
+
develop software applications and functionality designed to be used in conjunction with Tealium's products and services;
|
12 |
+
conduct quality assurance testing to ensure compatibility between your software application and Tealium's products and services; and
|
13 |
+
conduct support testing to troubleshoot compatibility between your software application and Tealium's products and services.
|
14 |
+
|
15 |
+
During the Term, Tealium further grants to You a non-exclusive, non-transferable, royalty-free, limited world-wide license (with no right to sublicense) to market, reproduce, and distribute applications incorporating the integration You develop under this Agreement, either directly or through multiple levels of distributors, Your end users, but only under an end-user license agreement with terms that are as protective of Tealium's rights as this Agreement.
|
16 |
+
|
17 |
+
We do not grant any other rights to the Software. You may only use the Software during the Term, we reserve all rights not expressly granted under this Agreement, and there are no implied rights or other rights We grant hereunder, whether by estoppel or otherwise. You may not: (i) copy or reproduce the Software (except for reasonable archival purposes); (ii) modify or create any derivative works of the Software; (iii) decompile, disassemble, or reverse engineer the Software (except to the extent expressly permitted under applicable law); or (iv) remove or alter any trademark, logo, copyright or other proprietary notices, legends, symbols or labels in the Software. Further, You may not use the Software for any illegal or unauthorized purpose.
|
18 |
+
|
19 |
+
Tealium will retain all title, ownership, and Intellectual Property Rights in the Software and any derivative works thereof. “Intellectual Property Rights” will mean all patent, copyright, trade secret, trademark and other proprietary and intellectual property rights, including moral rights. The Software is protected by copyright and other intellectual property laws and by international treaties. You agree that We will own all suggestions, enhancements requests, feedback, recommendations, or other input provided by You or any other party relating to the Software. Other than the use licenses expressly granted in this Agreement, neither this Agreement nor its performance transfers from Us to You any Tealium intellectual property.
|
20 |
+
|
21 |
+
General Conditions and Restrictions
|
22 |
+
Your use of the Software is at Your sole risk.
|
23 |
+
You agree that Tealium is under no obligation to provide You with support for the Software, or to provide You with updates or error corrections ("Updates") to the Software. If Tealium, at its sole discretion, decides to provide You with Updates, Updates will be considered part of Software, and subject to the terms of this Agreement.
|
24 |
+
You agree not to reproduce, duplicate, copy, sell, resell, or exploit any portion or feature of the Software or access to the Software without express written permission from Tealium.
|
25 |
+
|
26 |
+
No Warranty
|
27 |
+
THE SOFTWARE IS PROVIDED ON AN “AS IS” AND “AS AVAILABLE” BASIS, AND TEALIUM EXPRESSLY DISCLAIMS ANY WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, QUIET ENJOYMENT, ACCURACY, OR NON-INFRINGEMENT. WITHOUT LIMITING THE FOREGOING, TEALIUM DOES NOT WARRANT THAT THE SERVICE WILL MEET YOUR SPECIFIC REQUIREMENTS, THAT THE SERVICE WILL BE UNINTERRUPTED, TIMELY, SECURE, OR ERROR-FREE, THAT THE RESULTS THAT MAY BE OBTAINED FROM THE USE OF THE SOFTWARE WILL BE COMPLETE, ACCURATE, OR RELIABLE, THAT THE QUALITY OF ANY PRODUCTS, SERVICES, INFORMATION, OR OTHER MATERIAL PURCHASED OR OBTAINED BY YOU THROUGH THE SOFTWARE WILL MEET YOUR EXPECTATIONS, OR THAT ANY ERRORS IN THE SOFTWARE WILL BE CORRECTED.
|
28 |
+
|
29 |
+
Limitation of Liability
|
30 |
+
YOU EXPRESSLY UNDERSTAND AND AGREE THAT TEALIUM WILL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES, INCLUDING BUT NOT LIMITED TO DAMAGES FOR LOSS OF PROFITS, GOODWILL, USE, DATA OR OTHER INTANGIBLE LOSSES (EVEN IF TEALIUM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES), INCLUDING ANY SUCH DAMAGES RESULTING FROM THE USE OR THE INABILITY TO USE THE SOFTWARE; THE COST OF PROCUREMENT OF SUBSTITUTE GOODS AND SERVICES RESULTING FROM ANY GOODS, DATA, INFORMATION OR SERVICES PURCHASED OR OBTAINED OR MESSAGES RECEIVED OR TRANSACTIONS ENTERED INTO THROUGH OR FROM THE SOFTWARE; UNAUTHORIZED ACCESS TO OR ALTERATION OF YOUR TRANSMISSIONS OR DATA; STATEMENTS OR CONDUCT OF ANY THIRD PARTY ON THE SOFTWARE; TERMINATION OF YOUR ACCOUNT; OR ANY OTHER MATTER RELATING TO THE SOFTWARE.
|
31 |
+
|
32 |
+
NOTWITHSTANDING ANYTHING TO THE CONTRARY CONTAINED HEREIN, TEALIUM’S LIABILITY TO YOU FOR ANY DAMAGES ARISING FROM OR RELATING TO THE SOFTWARE (FOR ANY CAUSE WHATSOEVER AND REGARDLESS OF THE FORM OF THE ACTION) WILL AT ALL TIMES BE LIMITED TO THE GREATER OR EITHER (1) THE AMOUNT YOU PAID TO TEALIUM IN THE SIX (6) MONTHS IMMEDIATELY PRECEDING THE INCIDENT GIVING RISE TO THE CLAIM OR (2) ONE HUNDRED FIFTY DOLLARS (USD 150.00).
|
33 |
+
|
34 |
+
Cancellation and Termination
|
35 |
+
Tealium, in its sole discretion, may terminate your license, for any reason at any time.
|
36 |
+
You, in your sole discretion, may terminate this Agreement immediately upon written notice to Tealium.
|
37 |
+
Upon termination or expiration of this Agreement, You will immediately cease use of and destroy the original and all copies of the Software in Your possession or control. Upon Tealium's written request, You will confirm to Tealium in writing that You have complied with all provisions of this Agreement.
|
38 |
+
Either party may terminate this Agreement upon written notice to the other party, for any material breach by the other party, if such breach is not cured within thirty (30) days after the non-breaching party provides the allegedly breaching party with written notice of such breach.
|
39 |
+
|
40 |
+
Miscellaneous
|
41 |
+
This Agreement will be governed by the laws of the State of California without giving effect to any conflicts of laws principles that may require the application of the law of a different jurisdiction. For any dispute or proceeding arising from or relating to this Agreement, You agree to submit to the jurisdiction of, and agree that venue is proper in, the state courts located in San Diego County, California, and in the federal courts located in the Southern District of California. The failure of Tealium to exercise or enforce any right or provision of this Agreement will not constitute a waiver of such right or provision. This Agreement constitutes the entire agreement between You and Tealium and governs Your use of the Service, superseding any prior agreements between You and Tealium (including, but not limited to, any prior versions of the Agreement).
|
@@ -1,23 +1,23 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
1 |
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<system>
|
8 |
+
<children>
|
9 |
+
<config>
|
10 |
+
<children>
|
11 |
+
<tealium_tags translate="title" module="tealium_tags">
|
12 |
+
<title>Tealium</title>
|
13 |
+
<sort_order>100</sort_order>
|
14 |
+
</tealium_tags>
|
15 |
+
</children>
|
16 |
+
</config>
|
17 |
+
</children>
|
18 |
+
</system>
|
19 |
+
</children>
|
20 |
+
</admin>
|
21 |
+
</resources>
|
22 |
+
</acl>
|
23 |
+
</config>
|
@@ -1,37 +1,37 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
</config>
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
+
<modules>
|
4 |
+
<Tealium_Tags>
|
5 |
+
<version>2.0.6</version>
|
6 |
+
</Tealium_Tags>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<helpers>
|
10 |
+
<tealium_tags>
|
11 |
+
<class>Tealium_Tags_Helper</class>
|
12 |
+
</tealium_tags>
|
13 |
+
</helpers>
|
14 |
+
<events>
|
15 |
+
<controller_front_send_response_before>
|
16 |
+
<observers>
|
17 |
+
<tealium_tags>
|
18 |
+
<type>singleton</type>
|
19 |
+
<class>
|
20 |
+
Tealium_Tags_Helper_Observer
|
21 |
+
</class>
|
22 |
+
<method>apiHandler</method>
|
23 |
+
</tealium_tags>
|
24 |
+
</observers>
|
25 |
+
</controller_front_send_response_before>
|
26 |
+
</events>
|
27 |
+
</global>
|
28 |
+
<frontend>
|
29 |
+
<layout>
|
30 |
+
<updates>
|
31 |
+
<tealium_tags>
|
32 |
+
<file>tealium_tags.xml</file>
|
33 |
+
</tealium_tags>
|
34 |
+
</updates>
|
35 |
+
</layout>
|
36 |
+
</frontend>
|
37 |
</config>
|
@@ -11,799 +11,1378 @@
|
|
11 |
</tabs>
|
12 |
<sections>
|
13 |
<tealium_tags translate="label" module="tealium_tags">
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
$
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
<
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
<
|
326 |
-
<
|
327 |
-
<
|
328 |
-
</
|
329 |
-
|
330 |
-
<
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
<
|
339 |
-
<
|
340 |
-
|
341 |
-
<
|
342 |
-
<
|
343 |
-
<
|
344 |
-
|
345 |
-
<
|
346 |
-
|
347 |
-
</
|
348 |
-
|
349 |
-
|
350 |
-
<
|
351 |
-
|
352 |
-
<
|
353 |
-
<
|
354 |
-
<
|
355 |
-
|
356 |
-
<
|
357 |
-
|
358 |
-
<
|
359 |
-
|
360 |
-
<
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
<
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
<
|
371 |
-
|
372 |
-
|
373 |
-
<
|
374 |
-
|
375 |
-
<
|
376 |
-
|
377 |
-
</
|
378 |
-
|
379 |
-
<
|
380 |
-
|
381 |
-
|
382 |
-
<
|
383 |
-
<
|
384 |
-
</
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
<
|
389 |
-
|
390 |
-
<p>
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
<
|
397 |
-
|
398 |
-
<
|
399 |
-
<
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
<
|
408 |
-
|
409 |
-
|
410 |
-
<
|
411 |
-
<
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
<
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
<
|
421 |
-
|
422 |
-
<
|
423 |
-
<a name="user-content-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
<
|
430 |
-
|
431 |
-
<
|
432 |
-
<a
|
433 |
-
|
434 |
-
<
|
435 |
-
|
436 |
-
|
437 |
-
<
|
438 |
-
<a name="user-content-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
<
|
445 |
-
|
446 |
-
<
|
447 |
-
<
|
448 |
-
|
449 |
-
<
|
450 |
-
<
|
451 |
-
|
452 |
-
<
|
453 |
-
<
|
454 |
-
|
455 |
-
<
|
456 |
-
<
|
457 |
-
|
458 |
-
|
459 |
-
<
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
<
|
465 |
-
<
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
<
|
472 |
-
|
473 |
-
|
474 |
-
<
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
<
|
480 |
-
|
481 |
-
|
482 |
-
<
|
483 |
-
|
484 |
-
|
485 |
-
<
|
486 |
-
|
487 |
-
|
488 |
-
<
|
489 |
-
<a name="user-content-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
<
|
496 |
-
|
497 |
-
<
|
498 |
-
<a name="user-content-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
<
|
505 |
-
|
506 |
-
<
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
<
|
513 |
-
<
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
<h6>
|
519 |
-
<a name="user-content-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
<
|
526 |
-
|
527 |
-
<
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
<
|
534 |
-
<
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
<h6>
|
540 |
-
<a name="user-content-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
<
|
547 |
-
|
548 |
-
<
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
<
|
555 |
-
<
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
<h6>
|
561 |
-
<a name="user-content-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
<
|
568 |
-
|
569 |
-
<
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
<
|
576 |
-
<
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
<h6>
|
582 |
-
<a name="user-content-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
<
|
589 |
-
|
590 |
-
<
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
<
|
597 |
-
<
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
<h6>
|
603 |
-
<a name="user-content-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
<
|
610 |
-
|
611 |
-
<
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
<
|
617 |
-
<
|
618 |
-
<
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
<
|
624 |
-
|
625 |
-
<
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
<
|
638 |
-
|
639 |
-
<
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
<
|
646 |
-
<
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
<
|
652 |
-
<
|
653 |
-
<
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
<
|
659 |
-
<
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
<
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
<
|
672 |
-
<
|
673 |
-
<
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
<
|
679 |
-
<
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
<
|
686 |
-
<a name="user-content-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
<
|
693 |
-
<
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
</
|
698 |
-
|
699 |
-
<
|
700 |
-
|
701 |
-
<
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
<
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
<
|
714 |
-
<
|
715 |
-
<
|
716 |
-
</
|
717 |
-
|
718 |
-
</
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
<
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
<
|
728 |
-
<a name="user-content-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
<
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
<
|
742 |
-
<
|
743 |
-
<
|
744 |
-
</
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
<
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
<
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
</
|
761 |
-
|
762 |
-
<
|
763 |
-
<
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
<
|
771 |
-
<
|
772 |
-
</
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
<
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
<
|
784 |
-
|
785 |
-
<
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
807 |
</tealium_tags>
|
808 |
</sections>
|
809 |
</config>
|
11 |
</tabs>
|
12 |
<sections>
|
13 |
<tealium_tags translate="label" module="tealium_tags">
|
14 |
+
<label>Tag Management</label>
|
15 |
+
<tab>tealium</tab>
|
16 |
+
<frontend_type>text</frontend_type>
|
17 |
+
<sort_order>100</sort_order>
|
18 |
+
<show_in_default>1</show_in_default>
|
19 |
+
<show_in_website>1</show_in_website>
|
20 |
+
<show_in_store>1</show_in_store>
|
21 |
+
<groups>
|
22 |
+
<general translate="label">
|
23 |
+
<comment>
|
24 |
+
<div style='background-color: #ffffff;margin-bottom: 10px;height: 90px;'>
|
25 |
+
<img
|
26 |
+
style='float:left;width: 205px;'
|
27 |
+
src='http://www.tealium.com/assets/img/tealium.gif'
|
28 |
+
/>
|
29 |
+
<span style='float:left;font-size: 20px; margin: 35px 0px 0px 20px;'>
|
30 |
+
Tag Management For Magento
|
31 |
+
</span>
|
32 |
+
</div>
|
33 |
+
Contact your account manager for support if you have questions on the fields below.
|
34 |
+
</comment>
|
35 |
+
<label>General</label>
|
36 |
+
<frontend_type>text</frontend_type>
|
37 |
+
<sort_order>0</sort_order>
|
38 |
+
<show_in_default>1</show_in_default>
|
39 |
+
<show_in_website>1</show_in_website>
|
40 |
+
<show_in_store>1</show_in_store>
|
41 |
+
<fields>
|
42 |
+
<enable translate="label">
|
43 |
+
<label>Enable</label>
|
44 |
+
<comment>
|
45 |
+
<![CDATA[
|
46 |
+
<span class="notice">
|
47 |
+
Enable/Disable this plugin
|
48 |
+
</span>
|
49 |
+
]]>
|
50 |
+
</comment>
|
51 |
+
<frontend_type>select</frontend_type>
|
52 |
+
<source_model>
|
53 |
+
adminhtml/system_config_source_yesno
|
54 |
+
</source_model>
|
55 |
+
<sort_order>1</sort_order>
|
56 |
+
<show_in_default>1</show_in_default>
|
57 |
+
<show_in_website>1</show_in_website>
|
58 |
+
<show_in_store>1</show_in_store>
|
59 |
+
</enable>
|
60 |
+
<onepage translate="label">
|
61 |
+
<label>Enable OnePage Checkout</label>
|
62 |
+
<comment>
|
63 |
+
<![CDATA[
|
64 |
+
<span class="notice">
|
65 |
+
Enable/Disable OnePage Checkout Support
|
66 |
+
</span>
|
67 |
+
]]>
|
68 |
+
</comment>
|
69 |
+
<frontend_type>select</frontend_type>
|
70 |
+
<source_model>
|
71 |
+
adminhtml/system_config_source_yesno
|
72 |
+
</source_model>
|
73 |
+
<sort_order>2</sort_order>
|
74 |
+
<show_in_default>1</show_in_default>
|
75 |
+
<show_in_website>1</show_in_website>
|
76 |
+
<show_in_store>1</show_in_store>
|
77 |
+
</onepage>
|
78 |
+
<account translate="label">
|
79 |
+
<label>Account</label>
|
80 |
+
<comment>
|
81 |
+
<![CDATA[
|
82 |
+
<span class="notice">
|
83 |
+
Tealium account name
|
84 |
+
</span>
|
85 |
+
]]>
|
86 |
+
</comment>
|
87 |
+
<frontend_type>text</frontend_type>
|
88 |
+
<sort_order>5</sort_order>
|
89 |
+
<show_in_default>1</show_in_default>
|
90 |
+
<show_in_website>1</show_in_website>
|
91 |
+
<show_in_store>1</show_in_store>
|
92 |
+
</account>
|
93 |
+
<profile translate="label">
|
94 |
+
<label>Profile</label>
|
95 |
+
<comment>
|
96 |
+
<![CDATA[
|
97 |
+
<span class="notice">
|
98 |
+
Tealium profile to use on all pages
|
99 |
+
</span>
|
100 |
+
]]>
|
101 |
+
</comment>
|
102 |
+
<frontend_type>text</frontend_type>
|
103 |
+
<sort_order>10</sort_order>
|
104 |
+
<show_in_default>1</show_in_default>
|
105 |
+
<show_in_website>1</show_in_website>
|
106 |
+
<show_in_store>1</show_in_store>
|
107 |
+
</profile>
|
108 |
+
<env translate="label">
|
109 |
+
<label>Environment</label>
|
110 |
+
<comment>
|
111 |
+
<![CDATA[
|
112 |
+
<span class="notice">
|
113 |
+
Tealium environment to load
|
114 |
+
</span>
|
115 |
+
]]>
|
116 |
+
</comment>
|
117 |
+
<frontend_type>text</frontend_type>
|
118 |
+
<sort_order>14</sort_order>
|
119 |
+
<show_in_default>1</show_in_default>
|
120 |
+
<show_in_website>1</show_in_website>
|
121 |
+
<show_in_store>1</show_in_store>
|
122 |
+
</env>
|
123 |
+
<custom_udo_enable translate="label">
|
124 |
+
<label>Enable Custom UDO</label>
|
125 |
+
<comment>
|
126 |
+
<![CDATA[
|
127 |
+
<span class="notice">
|
128 |
+
Enable the use of a custom PHP UDO definition file to extend the default Tealium Magento data layer
|
129 |
+
</span>
|
130 |
+
]]>
|
131 |
+
</comment>
|
132 |
+
<frontend_type>select</frontend_type>
|
133 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
134 |
+
<sort_order>15</sort_order>
|
135 |
+
<show_in_default>1</show_in_default>
|
136 |
+
<show_in_website>1</show_in_website>
|
137 |
+
<show_in_store>1</show_in_store>
|
138 |
+
</custom_udo_enable>
|
139 |
+
<udo translate="label">
|
140 |
+
<comment>
|
141 |
+
<![CDATA[
|
142 |
+
<span class="notice">Full system path of custom UDO definition file</span><br />
|
143 |
+
<a href="javascript:false;" onclick="javascript: document.getElementById('udo_example').style.display='block'">Click for example</a><br/>
|
144 |
+
<a href="javascript:false;" onclick="javascript: document.getElementById('code_example').style.display='block'">Click for UDO PHP base code</a>
|
145 |
+
<div style="display:none; background-color:#000; color:#0F0" id="udo_example">
|
146 |
+
/var/www/html/magento/udo/udo.php
|
147 |
+
<br /><a href="javascript:false;" onclick="javascript: document.getElementById('udo_example').style.display='none'">Hide</a>
|
148 |
+
</div>
|
149 |
+
<div style="display:none; background-color:#000; color:#0F0" id="code_example">
|
150 |
+
<pre>
|
151 |
+
<?php
|
152 |
+
// TealiumExtendData use this to override or extend default values proivided by the Tealium module
|
153 |
+
|
154 |
+
class TealiumExtendData {
|
155 |
+
private static $store;
|
156 |
+
private static $page;
|
157 |
+
|
158 |
+
public static function setStore($store){
|
159 |
+
TealiumExtendData::$store = $store;
|
160 |
+
}
|
161 |
+
|
162 |
+
public static function setPage($page){
|
163 |
+
TealiumExtendData::$page = $page;
|
164 |
+
}
|
165 |
+
|
166 |
+
public function getHome(){
|
167 |
+
$store = TealiumExtendData::$store;
|
168 |
+
$page = TealiumExtendData::$page;
|
169 |
+
|
170 |
+
$outputArray = array();
|
171 |
+
//$outputArray["custom_key"] = "value";
|
172 |
+
|
173 |
+
return $outputArray;
|
174 |
+
}
|
175 |
+
|
176 |
+
public function getSearch(){
|
177 |
+
$store = TealiumExtendData::$store;
|
178 |
+
$page = TealiumExtendData::$page;
|
179 |
+
|
180 |
+
$outputArray = array();
|
181 |
+
//$outputArray["custom_key"] = "value";
|
182 |
+
|
183 |
+
return $outputArray;
|
184 |
+
}
|
185 |
+
|
186 |
+
public function getCategory(){
|
187 |
+
$store = TealiumExtendData::$store;
|
188 |
+
$page = TealiumExtendData::$page;
|
189 |
+
|
190 |
+
$outputArray = array();
|
191 |
+
//$outputArray["custom_key"] = "value";
|
192 |
+
|
193 |
+
return $outputArray;
|
194 |
+
}
|
195 |
+
|
196 |
+
public function getProductPage(){
|
197 |
+
$store = TealiumExtendData::$store;
|
198 |
+
$page = TealiumExtendData::$page;
|
199 |
+
|
200 |
+
$outputArray = array();
|
201 |
+
//$outputArray["custom_key"] = "value";
|
202 |
+
// make sure any product values are in an array
|
203 |
+
|
204 |
+
return $outputArray;
|
205 |
+
}
|
206 |
+
|
207 |
+
public function getCartPage() {
|
208 |
+
$store = TealiumExtendData::$store;
|
209 |
+
$page = TealiumExtendData::$page;
|
210 |
+
|
211 |
+
$outputArray = array();
|
212 |
+
//$outputArray["custom_key"] = "value";
|
213 |
+
// make sure any product values are in an array
|
214 |
+
|
215 |
+
return $outputArray;
|
216 |
+
}
|
217 |
+
|
218 |
+
public function getOrderConfirmation(){
|
219 |
+
$store = TealiumExtendData::$store;
|
220 |
+
$page = TealiumExtendData::$page;
|
221 |
+
|
222 |
+
$outputArray = array();
|
223 |
+
//$outputArray["custom_key"] = "value";
|
224 |
+
// make sure any product values are in an array
|
225 |
+
|
226 |
+
return $outputArray;
|
227 |
+
}
|
228 |
+
|
229 |
+
public function getCustomerData(){
|
230 |
+
$store = TealiumExtendData::$store;
|
231 |
+
$page = TealiumExtendData::$page;
|
232 |
+
|
233 |
+
$outputArray = array();
|
234 |
+
//$outputArray["custom_key"] = "value";
|
235 |
+
|
236 |
+
return $outputArray;
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
|
241 |
+
TealiumExtendData::setStore($data["store"]);
|
242 |
+
TealiumExtendData::setPage($data["page"]);
|
243 |
+
|
244 |
+
|
245 |
+
$udoElements = array(
|
246 |
+
"Home" => function(){
|
247 |
+
$tealiumData = new TealiumExtendData();
|
248 |
+
return $tealiumData->getHome();
|
249 |
+
},
|
250 |
+
"Search" => function(){
|
251 |
+
$tealiumData = new TealiumExtendData();
|
252 |
+
return $tealiumData->getSearch();
|
253 |
+
},
|
254 |
+
"Category" => function(){
|
255 |
+
$tealiumData = new TealiumExtendData();
|
256 |
+
return $tealiumData->getCategory();
|
257 |
+
},
|
258 |
+
"ProductPage" => function(){
|
259 |
+
$tealiumData = new TealiumExtendData();
|
260 |
+
return $tealiumData->getProductPage();
|
261 |
+
},
|
262 |
+
"Cart" => function(){
|
263 |
+
$tealiumData = new TealiumExtendData();
|
264 |
+
return $tealiumData->getCartPage();
|
265 |
+
},
|
266 |
+
"Confirmation" => function(){
|
267 |
+
$tealiumData = new TealiumExtendData();
|
268 |
+
return $tealiumData->getOrderConfirmation();
|
269 |
+
},
|
270 |
+
"Customer" => function(){
|
271 |
+
$tealiumData = new TealiumExtendData();
|
272 |
+
return $tealiumData->getCustomerData();
|
273 |
+
}
|
274 |
+
);
|
275 |
+
|
276 |
+
|
277 |
+
?>
|
278 |
+
</pre>
|
279 |
+
<br /><a href="javascript:false;" onclick="javascript: document.getElementById('code_example').style.display='none'">Hide</a>
|
280 |
+
</div>
|
281 |
+
]]>
|
282 |
+
</comment>
|
283 |
+
<label>Custom UDO file path</label>
|
284 |
+
<frontend_type>text</frontend_type>
|
285 |
+
<sort_order>16</sort_order>
|
286 |
+
<show_in_default>1</show_in_default>
|
287 |
+
<show_in_website>1</show_in_website>
|
288 |
+
<show_in_store>1</show_in_store>
|
289 |
+
</udo>
|
290 |
+
<external_script translate="label">
|
291 |
+
<label>Enable External Script Support</label>
|
292 |
+
<comment>
|
293 |
+
<![CDATA[
|
294 |
+
<span class="notice">
|
295 |
+
Place Tealium code in external javaScript file
|
296 |
+
<br/>
|
297 |
+
*NOTE Order confirmation page will always load script on page
|
298 |
+
</span>
|
299 |
+
]]>
|
300 |
+
</comment>
|
301 |
+
<frontend_type>select</frontend_type>
|
302 |
+
<source_model>
|
303 |
+
adminhtml/system_config_source_yesno
|
304 |
+
</source_model>
|
305 |
+
<sort_order>17</sort_order>
|
306 |
+
<show_in_default>1</show_in_default>
|
307 |
+
<show_in_website>1</show_in_website>
|
308 |
+
<show_in_store>1</show_in_store>
|
309 |
+
</external_script>
|
310 |
+
<external_script_type translate="label">
|
311 |
+
<label>External Script Async</label>
|
312 |
+
<comment>
|
313 |
+
<![CDATA[
|
314 |
+
<span class="notice">
|
315 |
+
Enable async loading of the external script
|
316 |
+
<br />
|
317 |
+
!WARNING! By enabling, we can't gaurantee all of your tags will fire before the user navigates away
|
318 |
+
</span>
|
319 |
+
]]>
|
320 |
+
</comment>
|
321 |
+
<frontend_type>select</frontend_type>
|
322 |
+
<source_model>
|
323 |
+
adminhtml/system_config_source_yesno
|
324 |
+
</source_model>
|
325 |
+
<sort_order>18</sort_order>
|
326 |
+
<show_in_default>1</show_in_default>
|
327 |
+
<show_in_website>1</show_in_website>
|
328 |
+
<show_in_store>1</show_in_store>
|
329 |
+
</external_script_type>
|
330 |
+
<diagnostic_enable translate="label">
|
331 |
+
<label>Enable Diagnostic Tag</label>
|
332 |
+
<frontend_type>select</frontend_type>
|
333 |
+
<source_model>
|
334 |
+
adminhtml/system_config_source_yesno
|
335 |
+
</source_model>
|
336 |
+
<sort_order>19</sort_order>
|
337 |
+
<show_in_default>1</show_in_default>
|
338 |
+
<show_in_website>1</show_in_website>
|
339 |
+
<show_in_store>1</show_in_store>
|
340 |
+
</diagnostic_enable>
|
341 |
+
<diagnostic_tag translate="label">
|
342 |
+
<label>Custom diagnostic tag URI path</label>
|
343 |
+
<comment>
|
344 |
+
<![CDATA[
|
345 |
+
<span class="notice">
|
346 |
+
Please contact your Account Manager for information about this feature
|
347 |
+
</span>
|
348 |
+
]]>
|
349 |
+
</comment>
|
350 |
+
<frontend_type>text</frontend_type>
|
351 |
+
<sort_order>20</sort_order>
|
352 |
+
<show_in_default>1</show_in_default>
|
353 |
+
<show_in_website>1</show_in_website>
|
354 |
+
<show_in_store>1</show_in_store>
|
355 |
+
</diagnostic_tag>
|
356 |
+
<help translate="label">
|
357 |
+
<label>Help Section</label>
|
358 |
+
<comment>
|
359 |
+
<![CDATA[
|
360 |
+
<span class="notice">
|
361 |
+
Help Section on configuration of this plugin
|
362 |
+
</span>
|
363 |
+
|
364 |
+
<br />
|
365 |
+
|
366 |
+
<a href="javascript:false;" onclick="javascript: document.getElementById('tealium_help').style.display='block'">
|
367 |
+
Click to expand
|
368 |
+
</a>
|
369 |
+
|
370 |
+
<div style="display:none; background-color:#000; color:#0F0; width:250%" id="tealium_help">
|
371 |
+
|
372 |
+
<!-- ------------------------------------------------------------------------- -->
|
373 |
+
<div id="readme" >
|
374 |
+
<span class="name">
|
375 |
+
<span class="octicon octicon-book"></span>
|
376 |
+
README.md
|
377 |
+
</span>
|
378 |
+
|
379 |
+
<article class="markdown-body entry-content" itemprop="mainContentOfPage">
|
380 |
+
|
381 |
+
<h1>
|
382 |
+
<a name="user-content-tealium-extension-for-magento---103" class="anchor" href="#tealium-extension-for-magento---103">
|
383 |
+
<span class="octicon octicon-link"></span>
|
384 |
+
</a>
|
385 |
+
Tealium Extension for Magento 2.0.6
|
386 |
+
</h1>
|
387 |
+
|
388 |
+
<hr>
|
389 |
+
|
390 |
+
<p>
|
391 |
+
This Extension for Magento provides Tealium customers the means to easily tag their Magento sites for the purpose of leveraging the vendor-neutral tag management platform offered by Tealium.
|
392 |
+
</p>
|
393 |
+
|
394 |
+
<p>This Extension provides for:</p>
|
395 |
+
|
396 |
+
<ul>
|
397 |
+
<li>Making integration of Tealium into a Magento site more efficient</li>
|
398 |
+
<li>The ability to extend the default data layer in the extension via a user defined PHP file</li>
|
399 |
+
<li>Vendor integration via the Tealium platform</li>
|
400 |
+
<li>Implemented with the user in mind. All generated Tealium scripts are asynchronous as to not interfere or degrade the user experience. </li>
|
401 |
+
</ul>
|
402 |
+
|
403 |
+
<p>
|
404 |
+
These instructions presume you have valid accounts with both Tealium and also with the vendors you want to send data to, as well as an installed Magento instance and the knowledge on how to administer it.
|
405 |
+
</p>
|
406 |
+
|
407 |
+
<p>
|
408 |
+
Implementation is a three part process:
|
409 |
+
<ol>
|
410 |
+
<li>Get the <a href="http://www.magentocommerce.com/magento-connect/tealium-tag-management-1.html">Tealium extension</a> from the Magento Connect Market</li>
|
411 |
+
<li>Install the Tealium Extension for Magento via the Magento Connect Manager in your Magento admin UI</li>
|
412 |
+
<li>
|
413 |
+
Configure the Tealium extension in the system configuration of your admin UI
|
414 |
+
(optional: configure the custom PHP UDO definition file to extend the already included UDO (data layer) definition file)
|
415 |
+
</li>
|
416 |
+
<li>Configure your Tealium IQ dashboard with any vendor tags from our marketplace and publish</li>
|
417 |
+
</ol>
|
418 |
+
</p>
|
419 |
+
|
420 |
+
<hr>
|
421 |
+
|
422 |
+
<h2>
|
423 |
+
<a name="user-content-table-of-contents" class="anchor" href="#table-of-contents">
|
424 |
+
<span class="octicon octicon-link"></span>
|
425 |
+
</a>
|
426 |
+
Table of Contents
|
427 |
+
</h2>
|
428 |
+
|
429 |
+
<ul>
|
430 |
+
<li><a href="#requirements">Requirements</a></li>
|
431 |
+
<li><a href="#new-installation">New Installation</a></li>
|
432 |
+
<li><a href="#how-to-use">How To Use</a></li>
|
433 |
+
<li><a href="#tealium-iq-basic-set-up--verification-test">Tealium IQ Basic Set Up + Verification Test</a></li>
|
434 |
+
<li><a href="#versions">Versions</a></li>
|
435 |
+
</ul>
|
436 |
+
|
437 |
+
<h2>
|
438 |
+
<a name="user-content-requirements" class="anchor" href="#requirements">
|
439 |
+
<span class="octicon octicon-link"></span>
|
440 |
+
</a>
|
441 |
+
Requirements
|
442 |
+
</h2>
|
443 |
+
|
444 |
+
<p>You will need the following items:</p>
|
445 |
+
|
446 |
+
<ul>
|
447 |
+
<li>An active Tealium IQ Account</li>
|
448 |
+
<li>Your Tealium Account Id (it will likely be your company name)</li>
|
449 |
+
<li>The Tealium Profile name to be associated with the app (your account may have several profiles, ideally one of them is dedicated to your iOS app)</li>
|
450 |
+
<li>The Tealium environment to use:
|
451 |
+
|
452 |
+
<ul>
|
453 |
+
<li>prod</li>
|
454 |
+
<li>qa</li>
|
455 |
+
<li>dev</li>
|
456 |
+
<li>custom</li>
|
457 |
+
</ul>
|
458 |
+
</li>
|
459 |
+
<li>Minimum PHP version 5.1.0</li>
|
460 |
+
<li>Minimum Magento version 1.6</li>
|
461 |
+
</ul>
|
462 |
+
|
463 |
+
<h2>
|
464 |
+
<a name="user-content-new-installation" class="anchor" href="#new-installation">
|
465 |
+
<span class="octicon octicon-link"></span>
|
466 |
+
</a>New Installation
|
467 |
+
</h2>
|
468 |
+
|
469 |
+
<p>Installing the Tealium Extension into your instance of Magento requires the following steps:</p>
|
470 |
+
|
471 |
+
<ol>
|
472 |
+
<li>Get the Tealium extension from the Magento Connect Market
|
473 |
+
|
474 |
+
<ul>
|
475 |
+
<li><a href="http://www.magentocommerce.com/magento-connect/tealium-tag-management-1.html">Link to Tealium on Magento Connect</a></li>
|
476 |
+
</ul>
|
477 |
+
</li>
|
478 |
+
<li>Install the Tealium Extension for Magento via the Magento Connect Manager in your Magento admin UI</li>
|
479 |
+
<li>Configure the Tealium extension in the system configuration of your admin UI
|
480 |
+
|
481 |
+
<ul>
|
482 |
+
<li>optional: configure the custom PHP UDO definition file to extend the already included UDO (data layer) definition file</li>
|
483 |
+
</ul>
|
484 |
+
</li>
|
485 |
+
<li>All relevant best practices e-commerce variables will now be generated on your site and any tags you have set up in TealiumIQ will now work automatically</li>
|
486 |
+
</ol>
|
487 |
+
|
488 |
+
<h2>
|
489 |
+
<a name="user-content-dependencies" class="anchor" href="#dependencies">
|
490 |
+
<span class="octicon octicon-link"></span>
|
491 |
+
</a>
|
492 |
+
Dependencies
|
493 |
+
</h2>
|
494 |
+
|
495 |
+
<p>A live installation of Magento community or enterprise</p>
|
496 |
+
|
497 |
+
<h2>
|
498 |
+
<a name="user-content-how-to-use" class="anchor" href="#how-to-use">
|
499 |
+
<span class="octicon octicon-link"></span>
|
500 |
+
</a>
|
501 |
+
How To Use
|
502 |
+
</h2>
|
503 |
+
|
504 |
+
<h3>
|
505 |
+
<a name="user-content-predefined-data-layer-varaibles-already-available" class="anchor" href="#predefined-data-layer-varaibles-already-available">
|
506 |
+
<span class="octicon octicon-link"></span>
|
507 |
+
</a>
|
508 |
+
Predefined data layer variables already available
|
509 |
+
</h3>
|
510 |
+
|
511 |
+
<h4>
|
512 |
+
<a name="user-content-home" class="anchor" href="#home">
|
513 |
+
<span class="octicon octicon-link"></span>
|
514 |
+
</a>
|
515 |
+
Home
|
516 |
+
</h4>
|
517 |
+
|
518 |
+
<h6>
|
519 |
+
<a name="user-content-site_region" class="anchor" href="#site_region">
|
520 |
+
<span class="octicon octicon-link"></span>
|
521 |
+
</a>
|
522 |
+
site_region
|
523 |
+
</h6>
|
524 |
+
|
525 |
+
<h6>
|
526 |
+
<a name="user-content-site_currency" class="anchor" href="#site_currency">
|
527 |
+
<span class="octicon octicon-link"></span>
|
528 |
+
</a>
|
529 |
+
site_currency
|
530 |
+
</h6>
|
531 |
+
|
532 |
+
<h6>
|
533 |
+
<a name="user-content-page_name" class="anchor" href="#page_name">
|
534 |
+
<span class="octicon octicon-link"></span>
|
535 |
+
</a>
|
536 |
+
page_name
|
537 |
+
</h6>
|
538 |
+
|
539 |
+
<h6>
|
540 |
+
<a name="user-content-page_type" class="anchor" href="#page_type">
|
541 |
+
<span class="octicon octicon-link"></span>
|
542 |
+
</a>
|
543 |
+
page_type
|
544 |
+
</h6>
|
545 |
+
|
546 |
+
<h4>
|
547 |
+
<a name="user-content-search" class="anchor" href="#search">
|
548 |
+
<span class="octicon octicon-link"></span>
|
549 |
+
</a>
|
550 |
+
Search
|
551 |
+
</h4>
|
552 |
+
|
553 |
+
<h6>
|
554 |
+
<a name="user-content-site_region-1" class="anchor" href="#site_region-1">
|
555 |
+
<span class="octicon octicon-link"></span>
|
556 |
+
</a>
|
557 |
+
site_region
|
558 |
+
</h6>
|
559 |
+
|
560 |
+
<h6>
|
561 |
+
<a name="user-content-site_currency-1" class="anchor" href="#site_currency-1">
|
562 |
+
<span class="octicon octicon-link"></span>
|
563 |
+
</a>
|
564 |
+
site_currency
|
565 |
+
</h6>
|
566 |
+
|
567 |
+
<h6>
|
568 |
+
<a name="user-content-page_name-1" class="anchor" href="#page_name-1">
|
569 |
+
<span class="octicon octicon-link"></span>
|
570 |
+
</a>
|
571 |
+
page_name
|
572 |
+
</h6>
|
573 |
+
|
574 |
+
<h6>
|
575 |
+
<a name="user-content-page_type-1" class="anchor" href="#page_type-1">
|
576 |
+
<span class="octicon octicon-link"></span>
|
577 |
+
</a>
|
578 |
+
page_type
|
579 |
+
</h6>
|
580 |
+
|
581 |
+
<h6>
|
582 |
+
<a name="user-content-search_results" class="anchor" href="#search_results">
|
583 |
+
<span class="octicon octicon-link"></span>
|
584 |
+
</a>
|
585 |
+
search_results
|
586 |
+
</h6>
|
587 |
+
|
588 |
+
<h6>
|
589 |
+
<a name="user-content-search_keyword" class="anchor" href="#search_keyword">
|
590 |
+
<span class="octicon octicon-link"></span>
|
591 |
+
</a>
|
592 |
+
search_keyword
|
593 |
+
</h6>
|
594 |
+
|
595 |
+
<h4>
|
596 |
+
<a name="user-content-category" class="anchor" href="#category">
|
597 |
+
<span class="octicon octicon-link"></span>
|
598 |
+
</a>
|
599 |
+
Category
|
600 |
+
</h4>
|
601 |
+
|
602 |
+
<h6>
|
603 |
+
<a name="user-content-site_region-2" class="anchor" href="#site_region-2">
|
604 |
+
<span class="octicon octicon-link"></span>
|
605 |
+
</a>
|
606 |
+
site_region
|
607 |
+
</h6>
|
608 |
+
|
609 |
+
<h6>
|
610 |
+
<a name="user-content-site_currency-2" class="anchor" href="#site_currency-2">
|
611 |
+
<span class="octicon octicon-link"></span>
|
612 |
+
</a>
|
613 |
+
site_currency
|
614 |
+
</h6>
|
615 |
+
|
616 |
+
<h6>
|
617 |
+
<a name="user-content-page_name-2" class="anchor" href="#page_name-2">
|
618 |
+
<span class="octicon octicon-link"></span>
|
619 |
+
</a>
|
620 |
+
page_name
|
621 |
+
</h6>
|
622 |
+
|
623 |
+
<h6>
|
624 |
+
<a name="user-content-page_type-2" class="anchor" href="#page_type-2">
|
625 |
+
<span class="octicon octicon-link"></span>
|
626 |
+
</a>
|
627 |
+
page_type
|
628 |
+
</h6>
|
629 |
+
|
630 |
+
<h6>
|
631 |
+
<a name="user-content-page_section_name" class="anchor" href="#page_section_name">
|
632 |
+
<span class="octicon octicon-link"></span>
|
633 |
+
</a>
|
634 |
+
page_section_name
|
635 |
+
</h6>
|
636 |
+
|
637 |
+
<h6>
|
638 |
+
<a name="user-content-page_category_name" class="anchor" href="#page_category_name">
|
639 |
+
<span class="octicon octicon-link"></span>
|
640 |
+
</a>
|
641 |
+
page_category_name
|
642 |
+
</h6>
|
643 |
+
|
644 |
+
<h6>
|
645 |
+
<a name="user-content-page_subcategory_name" class="anchor" href="#page_subcategory_name">
|
646 |
+
<span class="octicon octicon-link"></span>
|
647 |
+
</a>
|
648 |
+
page_subcategory_name
|
649 |
+
</h6>
|
650 |
+
|
651 |
+
<h4>
|
652 |
+
<a name="user-content-productpage" class="anchor" href="#productpage">
|
653 |
+
<span class="octicon octicon-link"></span>
|
654 |
+
</a>
|
655 |
+
ProductPage
|
656 |
+
</h4>
|
657 |
+
|
658 |
+
<h6>
|
659 |
+
<a name="user-content-site_region-3" class="anchor" href="#site_region-3">
|
660 |
+
<span class="octicon octicon-link"></span>
|
661 |
+
</a>
|
662 |
+
site_region
|
663 |
+
</h6>
|
664 |
+
|
665 |
+
<h6>
|
666 |
+
<a name="user-content-site_currency-3" class="anchor" href="#site_currency-3">
|
667 |
+
<span class="octicon octicon-link"></span>
|
668 |
+
</a>site_currency
|
669 |
+
</h6>
|
670 |
+
|
671 |
+
<h6>
|
672 |
+
<a name="user-content-page_name-3" class="anchor" href="#page_name-3">
|
673 |
+
<span class="octicon octicon-link"></span>
|
674 |
+
</a>
|
675 |
+
page_name
|
676 |
+
</h6>
|
677 |
+
|
678 |
+
<h6>
|
679 |
+
<a name="user-content-page_type-3" class="anchor" href="#page_type-3">
|
680 |
+
<span class="octicon octicon-link"></span>
|
681 |
+
</a>
|
682 |
+
page_type
|
683 |
+
</h6>
|
684 |
+
|
685 |
+
<h6>
|
686 |
+
<a name="user-content-product_id" class="anchor" href="#product_id">
|
687 |
+
<span class="octicon octicon-link"></span>
|
688 |
+
</a>
|
689 |
+
product_id
|
690 |
+
</h6>
|
691 |
+
|
692 |
+
<h6>
|
693 |
+
<a name="user-content-product_sku" class="anchor" href="#product_sku">
|
694 |
+
<span class="octicon octicon-link"></span>
|
695 |
+
</a>
|
696 |
+
product_sku
|
697 |
+
</h6>
|
698 |
+
|
699 |
+
<h6>
|
700 |
+
<a name="user-content-product_name" class="anchor" href="#product_name">
|
701 |
+
<span class="octicon octicon-link"></span>
|
702 |
+
</a>
|
703 |
+
product_name
|
704 |
+
</h6>
|
705 |
+
|
706 |
+
<h6>
|
707 |
+
<a name="user-content-product_brand" class="anchor" href="#product_brand">
|
708 |
+
<span class="octicon octicon-link"></span>
|
709 |
+
</a>
|
710 |
+
product_brand
|
711 |
+
</h6>
|
712 |
+
|
713 |
+
<h6>
|
714 |
+
<a name="user-content-product_category" class="anchor" href="#product_category">
|
715 |
+
<span class="octicon octicon-link"></span>
|
716 |
+
</a>
|
717 |
+
product_category
|
718 |
+
</h6>
|
719 |
+
|
720 |
+
<h6>
|
721 |
+
<a name="user-content-product_unit_price" class="anchor" href="#product_unit_price">
|
722 |
+
<span class="octicon octicon-link"></span>
|
723 |
+
</a>
|
724 |
+
product_unit_price
|
725 |
+
</h6>
|
726 |
+
|
727 |
+
<h6>
|
728 |
+
<a name="user-content-product_list_price" class="anchor" href="#product_list_price">
|
729 |
+
<span class="octicon octicon-link"></span>
|
730 |
+
</a>
|
731 |
+
product_list_price
|
732 |
+
</h6>
|
733 |
+
|
734 |
+
<h4>
|
735 |
+
<a name="user-content-cart" class="anchor" href="#cart">
|
736 |
+
<span class="octicon octicon-link"></span>
|
737 |
+
</a>
|
738 |
+
Cart
|
739 |
+
</h4>
|
740 |
+
|
741 |
+
<h6>
|
742 |
+
<a name="user-content-site_region-4" class="anchor" href="#site_region-4">
|
743 |
+
<span class="octicon octicon-link"></span>
|
744 |
+
</a>
|
745 |
+
site_region
|
746 |
+
</h6>
|
747 |
+
|
748 |
+
<h6>
|
749 |
+
<a name="user-content-site_currency-4" class="anchor" href="#site_currency-4">
|
750 |
+
<span class="octicon octicon-link"></span>
|
751 |
+
</a>
|
752 |
+
site_currency
|
753 |
+
</h6>
|
754 |
+
|
755 |
+
<h6>
|
756 |
+
<a name="user-content-page_name-4" class="anchor" href="#page_name-4">
|
757 |
+
<span class="octicon octicon-link"></span>
|
758 |
+
</a>
|
759 |
+
page_name
|
760 |
+
</h6>
|
761 |
+
|
762 |
+
<h6>
|
763 |
+
<a name="user-content-page_type-4" class="anchor" href="#page_type-4">
|
764 |
+
<span class="octicon octicon-link"></span>
|
765 |
+
</a>
|
766 |
+
page_type
|
767 |
+
</h6>
|
768 |
+
|
769 |
+
<h6>
|
770 |
+
<a name="user-content-product_id-1" class="anchor" href="#product_id-1">
|
771 |
+
<span class="octicon octicon-link"></span>
|
772 |
+
</a>
|
773 |
+
product_id
|
774 |
+
</h6>
|
775 |
+
|
776 |
+
<h6>
|
777 |
+
<a name="user-content-product_sku-1" class="anchor" href="#product_sku-1">
|
778 |
+
<span class="octicon octicon-link"></span>
|
779 |
+
</a>
|
780 |
+
product_sku
|
781 |
+
</h6>
|
782 |
+
|
783 |
+
<h6>
|
784 |
+
<a name="user-content-product_name-1" class="anchor" href="#product_name-1">
|
785 |
+
<span class="octicon octicon-link"></span>
|
786 |
+
</a>
|
787 |
+
product_name
|
788 |
+
</h6>
|
789 |
+
|
790 |
+
<h6>
|
791 |
+
<a name="user-content-product_quantity" class="anchor" href="#product_quantity">
|
792 |
+
<span class="octicon octicon-link"></span>
|
793 |
+
</a>
|
794 |
+
product_quantity
|
795 |
+
</h6>
|
796 |
+
|
797 |
+
<h6>
|
798 |
+
<a name="user-content-product_list_price-1" class="anchor" href="#product_list_price-1">
|
799 |
+
<span class="octicon octicon-link"></span>
|
800 |
+
</a>
|
801 |
+
product_list_price
|
802 |
+
</h6>
|
803 |
+
|
804 |
+
<h4>
|
805 |
+
<a name="user-content-confirmation" class="anchor" href="#confirmation">
|
806 |
+
<span class="octicon octicon-link"></span>
|
807 |
+
</a>
|
808 |
+
Confirmation
|
809 |
+
</h4>
|
810 |
+
|
811 |
+
<h6>
|
812 |
+
<a name="user-content-site_region-5" class="anchor" href="#site_region-5">
|
813 |
+
<span class="octicon octicon-link"></span>
|
814 |
+
</a>
|
815 |
+
site_region
|
816 |
+
</h6>
|
817 |
+
|
818 |
+
<h6>
|
819 |
+
<a name="user-content-site_currency-5" class="anchor" href="#site_currency-5">
|
820 |
+
<span class="octicon octicon-link"></span>
|
821 |
+
</a>
|
822 |
+
site_currency
|
823 |
+
</h6>
|
824 |
+
|
825 |
+
<h6>
|
826 |
+
<a name="user-content-page_name-5" class="anchor" href="#page_name-5">
|
827 |
+
<span class="octicon octicon-link"></span>
|
828 |
+
</a>
|
829 |
+
page_name
|
830 |
+
</h6>
|
831 |
+
|
832 |
+
<h6>
|
833 |
+
<a name="user-content-page_type-5" class="anchor" href="#page_type-5">
|
834 |
+
<span class="octicon octicon-link"></span>
|
835 |
+
</a>
|
836 |
+
page_type
|
837 |
+
</h6>
|
838 |
+
|
839 |
+
<h6>
|
840 |
+
<a name="user-content-order_id" class="anchor" href="#order_id">
|
841 |
+
<span class="octicon octicon-link"></span>
|
842 |
+
</a>
|
843 |
+
order_id
|
844 |
+
</h6>
|
845 |
+
|
846 |
+
<h6>
|
847 |
+
<a name="user-content-order_discount" class="anchor" href="#order_discount">
|
848 |
+
<span class="octicon octicon-link"></span>
|
849 |
+
</a>
|
850 |
+
order_discount
|
851 |
+
</h6>
|
852 |
+
|
853 |
+
<h6>
|
854 |
+
<a name="user-content-order_subtotal" class="anchor" href="#order_subtotal">
|
855 |
+
<span class="octicon octicon-link"></span>
|
856 |
+
</a>
|
857 |
+
order_subtotal
|
858 |
+
</h6>
|
859 |
+
|
860 |
+
<h6>
|
861 |
+
<a name="user-content-order_shipping" class="anchor" href="#order_shipping">
|
862 |
+
<span class="octicon octicon-link"></span>
|
863 |
+
</a>
|
864 |
+
order_shipping
|
865 |
+
</h6>
|
866 |
+
|
867 |
+
<h6>
|
868 |
+
<a name="user-content-order_tax" class="anchor" href="#order_tax">
|
869 |
+
<span class="octicon octicon-link"></span>
|
870 |
+
</a>
|
871 |
+
order_tax
|
872 |
+
</h6>
|
873 |
+
|
874 |
+
<h6>
|
875 |
+
<a name="user-content-order_payment_type" class="anchor" href="#order_payment_type">
|
876 |
+
<span class="octicon octicon-link"></span>
|
877 |
+
</a>
|
878 |
+
order_payment_type
|
879 |
+
</h6>
|
880 |
+
|
881 |
+
<h6>
|
882 |
+
<a name="user-content-order_total" class="anchor" href="#order_total">
|
883 |
+
<span class="octicon octicon-link"></span>
|
884 |
+
</a>
|
885 |
+
order_total
|
886 |
+
</h6>
|
887 |
+
|
888 |
+
<h6>
|
889 |
+
<a name="user-content-order_currency" class="anchor" href="#order_currency">
|
890 |
+
<span class="octicon octicon-link"></span>
|
891 |
+
</a>
|
892 |
+
order_currency
|
893 |
+
</h6>
|
894 |
+
|
895 |
+
<h6>
|
896 |
+
<a name="user-content-customer_id" class="anchor" href="#customer_id">
|
897 |
+
<span class="octicon octicon-link"></span>
|
898 |
+
</a>
|
899 |
+
customer_id
|
900 |
+
</h6>
|
901 |
+
|
902 |
+
<h6>
|
903 |
+
<a name="user-content-customer_email" class="anchor" href="#customer_email">
|
904 |
+
<span class="octicon octicon-link"></span>
|
905 |
+
</a>
|
906 |
+
customer_email
|
907 |
+
</h6>
|
908 |
+
|
909 |
+
<h6>
|
910 |
+
<a name="user-content-product_id-2" class="anchor" href="#product_id-2">
|
911 |
+
<span class="octicon octicon-link"></span>
|
912 |
+
</a>
|
913 |
+
product_id
|
914 |
+
</h6>
|
915 |
+
|
916 |
+
<h6>
|
917 |
+
<a name="user-content-product_sku-2" class="anchor" href="#product_sku-2">
|
918 |
+
<span class="octicon octicon-link"></span>
|
919 |
+
</a>
|
920 |
+
product_sku
|
921 |
+
</h6>
|
922 |
+
|
923 |
+
<h6>
|
924 |
+
<a name="user-content-product_name-2" class="anchor" href="#product_name-2">
|
925 |
+
<span class="octicon octicon-link"></span>
|
926 |
+
</a>
|
927 |
+
product_name
|
928 |
+
</h6>
|
929 |
+
|
930 |
+
<h6>
|
931 |
+
<a name="user-content-product_list_price-2" class="anchor" href="#product_list_price-2">
|
932 |
+
<span class="octicon octicon-link"></span>
|
933 |
+
</a>
|
934 |
+
product_list_price
|
935 |
+
</h6>
|
936 |
+
|
937 |
+
<h6>
|
938 |
+
<a name="user-content-product_quantity-1" class="anchor" href="#product_quantity-1">
|
939 |
+
<span class="octicon octicon-link"></span>
|
940 |
+
</a>
|
941 |
+
product_quantity
|
942 |
+
</h6>
|
943 |
+
|
944 |
+
<h6>
|
945 |
+
<a name="user-content-product_discount" class="anchor" href="#product_discount">
|
946 |
+
<span class="octicon octicon-link"></span>
|
947 |
+
</a>
|
948 |
+
product_discount
|
949 |
+
</h6>
|
950 |
+
|
951 |
+
<h6>
|
952 |
+
<a name="user-content-product_discounts" class="anchor" href="#product_discounts">
|
953 |
+
<span class="octicon octicon-link"></span>
|
954 |
+
</a>
|
955 |
+
product_discounts
|
956 |
+
</h6>
|
957 |
+
|
958 |
+
<h6>
|
959 |
+
<a name="user-content-site_region-6" class="anchor" href="#site_region-6">
|
960 |
+
<span class="octicon octicon-link"></span>
|
961 |
+
</a>
|
962 |
+
site_region
|
963 |
+
</h6>
|
964 |
+
|
965 |
+
<h6>
|
966 |
+
<a name="user-content-site_currency-6" class="anchor" href="#site_currency-6">
|
967 |
+
<span class="octicon octicon-link"></span>
|
968 |
+
</a>
|
969 |
+
site_currency
|
970 |
+
</h6>
|
971 |
+
|
972 |
+
<h6>
|
973 |
+
<a name="user-content-page_name-6" class="anchor" href="#page_name-6">
|
974 |
+
<span class="octicon octicon-link"></span>
|
975 |
+
</a>
|
976 |
+
page_name
|
977 |
+
</h6>
|
978 |
+
|
979 |
+
<h6>
|
980 |
+
<a name="user-content-page_type-6" class="anchor" href="#page_type-6">
|
981 |
+
<span class="octicon octicon-link"></span>
|
982 |
+
</a>
|
983 |
+
page_type
|
984 |
+
</h6>
|
985 |
+
|
986 |
+
<h6>
|
987 |
+
<a name="user-content-customer_id-1" class="anchor" href="#customer_id-1">
|
988 |
+
<span class="octicon octicon-link"></span>
|
989 |
+
</a>
|
990 |
+
customer_id
|
991 |
+
</h6>
|
992 |
+
|
993 |
+
<h6>
|
994 |
+
<a name="user-content-customer_email-1" class="anchor" href="#customer_email-1">
|
995 |
+
<span class="octicon octicon-link"></span>
|
996 |
+
</a>
|
997 |
+
customer_email
|
998 |
+
</h6>
|
999 |
+
|
1000 |
+
<h6>
|
1001 |
+
<a name="user-content-customer_type" class="anchor" href="#customer_type">
|
1002 |
+
<span class="octicon octicon-link"></span>
|
1003 |
+
</a>
|
1004 |
+
customer_type
|
1005 |
+
</h6>
|
1006 |
+
|
1007 |
+
<h3>
|
1008 |
+
<a name="user-content-adding-custom-data-sources" class="anchor" href="#adding-custom-data-sources">
|
1009 |
+
<span class="octicon octicon-link"></span>
|
1010 |
+
</a>
|
1011 |
+
Adding Custom Data Sources
|
1012 |
+
</h3>
|
1013 |
+
|
1014 |
+
<p>
|
1015 |
+
If you need to modify the default variables or page types you can define these in an external file and place it in accessible folder for the plugin to read from.
|
1016 |
+
</p>
|
1017 |
+
|
1018 |
+
<ol>
|
1019 |
+
<li>In the Magento admin configuration set Enable Custom UDO to "Yes"</li>
|
1020 |
+
<li>Specify the system path to the file in the configuration</li>
|
1021 |
+
<li>If you need a base PHP block to start with click the "Click for UDO PHP base code" link and copy this code</li>
|
1022 |
+
</ol>
|
1023 |
+
|
1024 |
+
<h2>
|
1025 |
+
<a name="user-content-tealium-iq-basic-set-up--verification-test" class="anchor" href="#tealium-iq-basic-set-up--verification-test">
|
1026 |
+
<span class="octicon octicon-link"></span>
|
1027 |
+
</a>Tealium IQ Basic Set Up + Verification Test
|
1028 |
+
</h2>
|
1029 |
+
|
1030 |
+
<p>
|
1031 |
+
This example is for mapping two variables to a Google Analytics account to your app through the Tealium Management Console. This example presumes you have already done the following:
|
1032 |
+
</p>
|
1033 |
+
|
1034 |
+
<ul>
|
1035 |
+
<li>Setup a Google analytics account from <a href="http://www.google.com/analytics/">www.google.com/analytics/</a></li>
|
1036 |
+
<li>Have added Tealium tracking code to your project (see instructions above)</li>
|
1037 |
+
<li>Have a Tealium account at <a href="http://www.tealium.com">www.tealium.com</a></li>
|
1038 |
+
</ul>
|
1039 |
+
|
1040 |
+
<p>Verification steps are:</p>
|
1041 |
+
|
1042 |
+
<ol>
|
1043 |
+
<li><p>Log into your Tealium account</p></li>
|
1044 |
+
<li><p>Load the Account and Profile that matches the Account and Profile used in your <strong>Tealium($accountInit, $profileInit, $targetInit[, $pageType][, $data])</strong> method.</p></li>
|
1045 |
+
|
1046 |
+
<li>
|
1047 |
+
<p>Goto the <strong>Data Sources</strong> tab and add the following new data source: </p>
|
1048 |
+
|
1049 |
+
<ul>
|
1050 |
+
<li>screen_title</li>
|
1051 |
+
</ul>
|
1052 |
+
|
1053 |
+
<p>
|
1054 |
+
Note: leave them as the default type: Data Layer. <em>screen_title</em> are your views' viewcontroller title or nibName property.
|
1055 |
+
Optional: copy and paste the entire set of predefined Data Sources found at: <a href="https://community.tealiumiq.com/t5/Mobile/Mobile-Autotracked-Data-Sources/m-p/1798/highlight/true#M259">https://community.tealiumiq.com/t5/Mobile/Mobile-Autotracked-Data-Sources/m-p/1798/highlight/true#M259</a>
|
1056 |
+
</p>
|
1057 |
+
|
1058 |
+
</li>
|
1059 |
+
|
1060 |
+
<li>
|
1061 |
+
<p>Go to the <strong>Tags</strong> tab:</p>
|
1062 |
+
|
1063 |
+
<ul>
|
1064 |
+
<li>click on the <em>+Add Tag</em> button</li>
|
1065 |
+
<li>select Google Analytics</li>
|
1066 |
+
<li>enter any title (ie "GAN") in the title field</li>
|
1067 |
+
<li>enter your Google Analytics product id into the account id field (this is the account id assigned by Google and usually starts with the letters <em>UA</em>...)</li>
|
1068 |
+
<li>click on the <em>Next</em> button</li>
|
1069 |
+
<li>make sure the <em>Display All Pages</em> option is checked in the Load Rules section</li>
|
1070 |
+
<li>click on the <em>Next</em> button</li>
|
1071 |
+
<li>in the <em>Source Values</em> dropdown - select <em>screen_title(js)</em> - click on <em>Select Variable</em></li>
|
1072 |
+
<li>select <em>Page Name (Override)</em> option in the Mapping Toolbox</li>
|
1073 |
+
<li>click <em>save</em></li>
|
1074 |
+
<li>click <em>save</em></li>
|
1075 |
+
<li>click on the <em>finish</em></li>
|
1076 |
+
</ul>
|
1077 |
+
|
1078 |
+
</li>
|
1079 |
+
|
1080 |
+
<li>
|
1081 |
+
<p>Click on the <em>Save/Publish</em> button</p>
|
1082 |
+
|
1083 |
+
<ul>
|
1084 |
+
<li>Click on Configure Publish Options... The Publish Settings dialog box will appear. Make certain the "Enable Mobile App Support" option is checked on and click "Apply". </li>
|
1085 |
+
<li>Enter any <em>Version Notes</em> regarding this deployment</li>
|
1086 |
+
<li>Select the <em>Publish Location</em> that matches the <em>environmentName</em>, or target argument from your <em>initSharedInstance:profile:target:</em> method</li>
|
1087 |
+
<li>Click "Save"</li>
|
1088 |
+
</ul>
|
1089 |
+
|
1090 |
+
<p>NOTE: It may take up to five minutes for your newly published settings to take effect.</p>
|
1091 |
+
|
1092 |
+
</li>
|
1093 |
+
|
1094 |
+
<li><p>Log into your Google Analytics dash board - goto your real time tracking section</p></li>
|
1095 |
+
<li><p>Launch your app and interact with it. You should see view appearances (page changes) show in your Google Analytics dashboard</p></li>
|
1096 |
+
</ol>
|
1097 |
+
|
1098 |
+
<h2>
|
1099 |
+
<a name="user-content-faq" class="anchor" href="#faq">
|
1100 |
+
<span class="octicon octicon-link"></span>
|
1101 |
+
</a>
|
1102 |
+
FAQ
|
1103 |
+
</h2>
|
1104 |
+
|
1105 |
+
<h2></h2>
|
1106 |
+
|
1107 |
+
<h2>
|
1108 |
+
<a name="user-content-troubleshooting" class="anchor" href="#troubleshooting">
|
1109 |
+
<span class="octicon octicon-link"></span>
|
1110 |
+
</a>Troubleshooting
|
1111 |
+
</h2>
|
1112 |
+
|
1113 |
+
<ul>
|
1114 |
+
<li>
|
1115 |
+
A few of our customers have found that after installing the Tealium plugin for Magento and trying to go to its related configuration page they will come across a "404 Error Page not found." This covers some solutions to resolve the issue.
|
1116 |
+
There are a few things to try when you get this error. They are, in order of severity:
|
1117 |
+
|
1118 |
+
<ul>
|
1119 |
+
<li>Log out, then log back in
|
1120 |
+
|
1121 |
+
<ul>
|
1122 |
+
<li>The first is self explanatory. Simply log out of the Magento admin area, then log back in. This should reset some of the Magento cache and hopefully allow access the config page. If this does not work, try completely flushing the Magento Cache. </li>
|
1123 |
+
</ul>
|
1124 |
+
</li>
|
1125 |
+
|
1126 |
+
<li>
|
1127 |
+
Flush the Magento cache
|
1128 |
+
|
1129 |
+
<ul>
|
1130 |
+
<li>Go to System -> Cache Management</li>
|
1131 |
+
<li>Click the Flush Magento Cache button.</li>
|
1132 |
+
<li>Then log out, and log back in</li>
|
1133 |
+
<li>Try accessing the configuration page.</li>
|
1134 |
+
<li>If you still get a 404 Error, the next step is to manually Reset the Administrator Roles.</li>
|
1135 |
+
</ul>
|
1136 |
+
</li>
|
1137 |
+
|
1138 |
+
<li>
|
1139 |
+
Reset the Administrator roles
|
1140 |
+
|
1141 |
+
<ul>
|
1142 |
+
<li>Go to System -> Permissions -> Roles</li>
|
1143 |
+
<li>Now click on the Administrators role in the list. There may only be one item listed, or maybe more.</li>
|
1144 |
+
<li>Click the Role Users item on the left, then the Reset Filter button on the right. Lastly click the Save Role button at the top right.</li>
|
1145 |
+
<li>Now go through the process of Flushing the Magento cache, and again log out and log back in.</li>
|
1146 |
+
</ul>
|
1147 |
+
</li>
|
1148 |
+
</ul>
|
1149 |
+
</li>
|
1150 |
+
</ul>
|
1151 |
+
|
1152 |
+
<p>One of these techniques should fix the problem. If you are still experiencing 404 Errors after trying all of these solutions, get in contact with us and we will help you as best we can.</p>
|
1153 |
+
|
1154 |
+
<h2>
|
1155 |
+
<a name="user-content-known-limitations-of-current-build" class="anchor" href="#known-limitations-of-current-build">
|
1156 |
+
<span class="octicon octicon-link"></span>
|
1157 |
+
</a>
|
1158 |
+
Known Limitations of Current Build
|
1159 |
+
</h2>
|
1160 |
+
|
1161 |
+
<h2></h2>
|
1162 |
+
|
1163 |
+
<h2>
|
1164 |
+
<a name="user-content-versions" class="anchor" href="#versions">
|
1165 |
+
<span class="octicon octicon-link"></span>
|
1166 |
+
</a>
|
1167 |
+
Versions
|
1168 |
+
</h2>
|
1169 |
+
|
1170 |
+
<p>
|
1171 |
+
<em>2.0.6</em>
|
1172 |
+
</p>
|
1173 |
+
|
1174 |
+
<ul>
|
1175 |
+
<li>UDO will now be pretty printed for readability</li>
|
1176 |
+
<li>Added comments to code to improve long term maintainability</li>
|
1177 |
+
</ul>
|
1178 |
+
|
1179 |
+
<p>
|
1180 |
+
<em>2.0.4</em>
|
1181 |
+
</p>
|
1182 |
+
|
1183 |
+
<ul>
|
1184 |
+
<li>fixed one page checkout</li>
|
1185 |
+
</ul>
|
1186 |
+
|
1187 |
+
<p>
|
1188 |
+
<em>2.0.3</em>
|
1189 |
+
</p>
|
1190 |
+
|
1191 |
+
<ul>
|
1192 |
+
<li>Fixed warnings for REQUEST isset()</li>
|
1193 |
+
<li>re-added page_type and page_name for order confirmation</li>
|
1194 |
+
</ul>
|
1195 |
+
|
1196 |
+
<p>
|
1197 |
+
<em>2.0.2</em>
|
1198 |
+
</p>
|
1199 |
+
|
1200 |
+
<ul>
|
1201 |
+
<li>Fix typos</li>
|
1202 |
+
</ul>
|
1203 |
+
|
1204 |
+
<p>
|
1205 |
+
<em>2.0.1</em>
|
1206 |
+
</p>
|
1207 |
+
|
1208 |
+
<ul>
|
1209 |
+
<li>Fix for extended UDO rendering blank page</li>
|
1210 |
+
</ul>
|
1211 |
+
|
1212 |
+
<p>
|
1213 |
+
<em>2.0.0</em>
|
1214 |
+
</p>
|
1215 |
+
|
1216 |
+
<ul>
|
1217 |
+
<li>Added external script support and refactored</li>
|
1218 |
+
</ul>
|
1219 |
+
|
1220 |
+
<p>
|
1221 |
+
<em>1.2.0</em>
|
1222 |
+
</p>
|
1223 |
+
|
1224 |
+
<ul>
|
1225 |
+
<li>Added UI admin toggle for onePage Checkout</li>
|
1226 |
+
</ul>
|
1227 |
+
|
1228 |
+
<p>
|
1229 |
+
<em>1.1.1</em>
|
1230 |
+
</p>
|
1231 |
+
|
1232 |
+
<ul>
|
1233 |
+
<li>Fixed pages not rendering</li>
|
1234 |
+
</ul>
|
1235 |
+
|
1236 |
+
<p>
|
1237 |
+
<em>1.1.0</em>
|
1238 |
+
</p>
|
1239 |
+
|
1240 |
+
<ul>
|
1241 |
+
<li>Added support for alternate checkout pages</li>
|
1242 |
+
</ul>
|
1243 |
+
|
1244 |
+
<p>
|
1245 |
+
<em>1.0.2</em>
|
1246 |
+
</p>
|
1247 |
+
|
1248 |
+
<ul>
|
1249 |
+
<li>Added html/text help to admin config</li>
|
1250 |
+
</ul>
|
1251 |
+
|
1252 |
+
<p>
|
1253 |
+
<em>1.0.1</em>
|
1254 |
+
</p>
|
1255 |
+
|
1256 |
+
<ul>
|
1257 |
+
<li>Fixed arrays that were rendering as strings</li>
|
1258 |
+
</ul>
|
1259 |
+
|
1260 |
+
<p>
|
1261 |
+
<em>1.0.0</em>
|
1262 |
+
</p>
|
1263 |
+
|
1264 |
+
<ul>
|
1265 |
+
<li>refactored based on Tealium class</li>
|
1266 |
+
<li>added support for external UDO definition</li>
|
1267 |
+
<li>added support for diagnostic pixel</li>
|
1268 |
+
</ul>
|
1269 |
+
|
1270 |
+
<p>
|
1271 |
+
<em>0.4.4d</em>
|
1272 |
+
</p>
|
1273 |
+
|
1274 |
+
<ul>
|
1275 |
+
<li>added output of diagnostic pixel</li>
|
1276 |
+
</ul>
|
1277 |
+
|
1278 |
+
<p>
|
1279 |
+
<em>0.4.4</em>
|
1280 |
+
</p>
|
1281 |
+
|
1282 |
+
<ul>
|
1283 |
+
<li>strip commas from all dollar values</li>
|
1284 |
+
</ul>
|
1285 |
+
|
1286 |
+
<p>
|
1287 |
+
<em>0.4.3</em>
|
1288 |
+
</p>
|
1289 |
+
|
1290 |
+
<ul>
|
1291 |
+
<li>fix for bad array on order page</li>
|
1292 |
+
</ul>
|
1293 |
+
|
1294 |
+
<p>
|
1295 |
+
<em>0.4.2</em>
|
1296 |
+
</p>
|
1297 |
+
|
1298 |
+
<ul>
|
1299 |
+
<li>added simple discount array</li>
|
1300 |
+
</ul>
|
1301 |
+
|
1302 |
+
<p>
|
1303 |
+
<em>0.4.0</em>
|
1304 |
+
</p>
|
1305 |
+
|
1306 |
+
<ul>
|
1307 |
+
<li>fix for individual discounts and number formats</li>
|
1308 |
+
</ul>
|
1309 |
+
|
1310 |
+
<p>
|
1311 |
+
<em>0.3.1</em>
|
1312 |
+
</p>
|
1313 |
+
|
1314 |
+
<ul>
|
1315 |
+
<li>fix for configurable product arrays</li>
|
1316 |
+
</ul>
|
1317 |
+
|
1318 |
+
<p>
|
1319 |
+
<em>0.3.0</em>
|
1320 |
+
</p>
|
1321 |
+
|
1322 |
+
<ul>
|
1323 |
+
<li>fix for missing support message</li>
|
1324 |
+
</ul>
|
1325 |
+
|
1326 |
+
<p>
|
1327 |
+
<em>0.2.0</em>
|
1328 |
+
</p>
|
1329 |
+
|
1330 |
+
<ul>
|
1331 |
+
<li>fix for product page tag syntax</li>
|
1332 |
+
</ul>
|
1333 |
+
|
1334 |
+
<p>
|
1335 |
+
<em>0.1.0</em>
|
1336 |
+
</p>
|
1337 |
+
|
1338 |
+
<ul>
|
1339 |
+
<li>initial release</li>
|
1340 |
+
</ul>
|
1341 |
+
|
1342 |
+
<h2>
|
1343 |
+
<a name="user-content-support" class="anchor" href="#support">
|
1344 |
+
<span class="octicon octicon-link"></span>
|
1345 |
+
</a>
|
1346 |
+
Support
|
1347 |
+
</h2>
|
1348 |
+
|
1349 |
+
<p>
|
1350 |
+
For additional help and support, please send all inquires to your Account Manager or post questions on our community site at:
|
1351 |
+
<a href="https://community.tealiumiq.com">https://community.tealiumiq.com</a>
|
1352 |
+
</p>
|
1353 |
+
|
1354 |
+
<h2>
|
1355 |
+
<a name="user-content-about" class="anchor" href="#about">
|
1356 |
+
<span class="octicon octicon-link"></span>
|
1357 |
+
</a>
|
1358 |
+
About
|
1359 |
+
</h2>
|
1360 |
+
|
1361 |
+
<p>
|
1362 |
+
Tealium PHP Library developed by Patrick McWilliams
|
1363 |
+
Copyright © 2014 Tealium, Inc. All rights reserved.
|
1364 |
+
</p>
|
1365 |
+
</article>
|
1366 |
+
</div>
|
1367 |
+
|
1368 |
+
<!-- ------------------------------------------------------------------------- -->
|
1369 |
+
|
1370 |
+
<br />
|
1371 |
+
|
1372 |
+
<a href="javascript:false;" onclick="javascript: document.getElementById('tealium_help').style.display='none'">Hide</a>
|
1373 |
+
|
1374 |
+
</div>
|
1375 |
+
]]>
|
1376 |
+
</comment>
|
1377 |
+
<frontend_type>label</frontend_type>
|
1378 |
+
<sort_order>30</sort_order>
|
1379 |
+
<show_in_default>1</show_in_default>
|
1380 |
+
<show_in_website>1</show_in_website>
|
1381 |
+
<show_in_store>1</show_in_store>
|
1382 |
+
</help>
|
1383 |
+
</fields>
|
1384 |
+
</general>
|
1385 |
+
</groups>
|
1386 |
</tealium_tags>
|
1387 |
</sections>
|
1388 |
</config>
|
@@ -1,6 +1,6 @@
|
|
1 |
<layout version="0.1.0">
|
2 |
|
3 |
-
|
4 |
|
5 |
Add specific blocks on all frontend pages
|
6 |
catalog
|
@@ -11,8 +11,9 @@
|
|
11 |
search
|
12 |
(and remove the generic code)
|
13 |
-->
|
14 |
-
|
15 |
<!-- Category Pages -->
|
|
|
16 |
<catalog_category_default>
|
17 |
<reference name="after_body_start">
|
18 |
<remove name="tealium_generic" />
|
@@ -26,8 +27,12 @@
|
|
26 |
<block type="catalog/category_view" name="tealium_category" as="tealium_category" template="tealium_tags/category.phtml" before="tealium_base" />
|
27 |
</reference>
|
28 |
</catalog_category_layered>
|
|
|
|
|
|
|
29 |
|
30 |
<!-- Product Page -->
|
|
|
31 |
<catalog_product_view>
|
32 |
<reference name="after_body_start">
|
33 |
<remove name="tealium_generic" />
|
@@ -41,8 +46,12 @@
|
|
41 |
<block type="catalog/product_compare_list" name="tealium_catalog_product_compare_index" as="tealium_catalog_product_compare_index" template="tealium_tags/catalog_product_compare_index.phtml" before="tealium_base" />
|
42 |
</reference>
|
43 |
</catalog_product_compare_index>
|
|
|
|
|
|
|
44 |
|
45 |
<!-- SEO Sitemap -->
|
|
|
46 |
<catalog_seo_sitemap>
|
47 |
<!-- Covered by layouts below -->
|
48 |
</catalog_seo_sitemap>
|
@@ -94,17 +103,24 @@
|
|
94 |
</block>
|
95 |
</reference>
|
96 |
</catalog_seo_searchterm_popular>
|
|
|
|
|
|
|
97 |
|
98 |
<!-- Send to friend -->
|
|
|
99 |
<sendfriend_product_send>
|
100 |
<reference name="after_body_start">
|
101 |
<remove name="tealium_generic" />
|
102 |
<block type="sendfriend/send" name="tealium_product_send" as="tealium_product_send" template="tealium_tags/product_send.phtml" before="tealium_base" />
|
103 |
</reference>
|
104 |
</sendfriend_product_send>
|
|
|
|
|
105 |
|
106 |
-
<!-- Customer -->
|
107 |
|
|
|
|
|
108 |
<customer_account>
|
109 |
<reference name="after_body_start">
|
110 |
<remove name="tealium_generic" />
|
@@ -116,9 +132,12 @@
|
|
116 |
</block>
|
117 |
</reference>
|
118 |
</customer_account>
|
|
|
|
|
119 |
|
120 |
-
<!-- CMS -->
|
121 |
|
|
|
|
|
122 |
<cms_page>
|
123 |
<reference name="after_body_start">
|
124 |
<remove name="tealium_generic" />
|
@@ -130,8 +149,12 @@
|
|
130 |
</block>
|
131 |
</reference>
|
132 |
</cms_page>
|
|
|
|
|
|
|
133 |
|
134 |
<!-- Checkout/Cart steps/Success -->
|
|
|
135 |
<checkout_cart_index>
|
136 |
<reference name="after_body_start">
|
137 |
<remove name="tealium_generic" />
|
@@ -152,28 +175,52 @@
|
|
152 |
<block type="checkout/onepage_success" name="checkout_onepage_success" as="checkout_onepage_success" template="tealium_tags/checkout_success.phtml" before="tealium_base" />
|
153 |
</reference>
|
154 |
</checkout_onepage_success>
|
|
|
|
|
|
|
155 |
|
156 |
<!-- Multi-shipping uses same template as above -->
|
|
|
157 |
<checkout_multishipping>
|
158 |
<reference name="after_body_start">
|
159 |
<remove name="tealium_generic" />
|
160 |
<block type="core/template" name="tealium_checkout_onepage" as="tealium_checkout_onepage" template="tealium_tags/checkout_onepage.phtml" before="tealium_base" />
|
161 |
</reference>
|
162 |
</checkout_multishipping>
|
|
|
|
|
163 |
|
164 |
|
165 |
<!-- Search/Advanced Search -->
|
|
|
166 |
<catalogsearch_result_index>
|
167 |
<reference name="after_body_start">
|
168 |
<remove name="tealium_generic" />
|
169 |
<block type="catalogsearch/result" name="tealium_catalogsearch_result_index" as="tealium_catalogsearch_result_index" template="tealium_tags/catalogsearch_result_index.phtml" before="tealium_base">
|
170 |
<block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
|
171 |
-
<action method="addColumnCountLayoutDepend"
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
<action method="addColumnCountLayoutDepend"
|
176 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
</block>
|
178 |
<action method="setListOrders"/>
|
179 |
<action method="setListModes"/>
|
@@ -195,6 +242,9 @@
|
|
195 |
<block type="catalogsearch/term" name="tealium_catalogsearch_term_popular" as="tealium_catalogsearch_term_popular" template="tealium_tags/catalogsearch_term_popular.phtml" before="tealium_base" />
|
196 |
</reference>
|
197 |
</catalogsearch_term_popular>
|
|
|
|
|
|
|
198 |
|
199 |
<!-- Tags -->
|
200 |
|
@@ -213,7 +263,9 @@
|
|
213 |
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
|
214 |
<block type="page/html_pager" name="product_list_toolbar_pager"/>
|
215 |
</block>
|
216 |
-
<action method="setToolbarBlockName"
|
|
|
|
|
217 |
</block>
|
218 |
<action method="setListOrders"/>
|
219 |
<action method="setListModes"/>
|
@@ -221,6 +273,9 @@
|
|
221 |
</block>
|
222 |
</reference>
|
223 |
</tag_product_list>
|
|
|
|
|
|
|
224 |
|
225 |
<!-- Guest Sales -->
|
226 |
|
@@ -239,36 +294,39 @@
|
|
239 |
</block>
|
240 |
</reference>
|
241 |
</sales_guest_form>
|
|
|
242 |
<sales_guest_view>
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
</
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
</
|
269 |
-
</
|
270 |
-
</
|
271 |
-
</
|
|
|
|
|
272 |
<sales_guest_shipment>
|
273 |
<reference name="after_body_start">
|
274 |
<remove name="tealium_generic" />
|
@@ -284,6 +342,7 @@
|
|
284 |
</block>
|
285 |
</reference>
|
286 |
</sales_guest_shipment>
|
|
|
287 |
<sales_guest_creditmemo>
|
288 |
<reference name="after_body_start">
|
289 |
<remove name="tealium_generic" />
|
@@ -299,6 +358,7 @@
|
|
299 |
</block>
|
300 |
</reference>
|
301 |
</sales_guest_creditmemo>
|
|
|
302 |
<sales_guest_reorder>
|
303 |
<reference name="after_body_start">
|
304 |
<remove name="tealium_generic" />
|
@@ -330,6 +390,7 @@
|
|
330 |
</block>
|
331 |
</reference>
|
332 |
</sales_guest_print>
|
|
|
333 |
<sales_guest_printinvoice>
|
334 |
<reference name="after_body_start">
|
335 |
<remove name="tealium_generic" />
|
@@ -345,6 +406,7 @@
|
|
345 |
</block>
|
346 |
</reference>
|
347 |
</sales_guest_printinvoice>
|
|
|
348 |
<sales_guest_printshipment>
|
349 |
<reference name="after_body_start">
|
350 |
<remove name="tealium_generic" />
|
@@ -360,6 +422,7 @@
|
|
360 |
</block>
|
361 |
</reference>
|
362 |
</sales_guest_printshipment>
|
|
|
363 |
<sales_guest_printcreditmemo>
|
364 |
<reference name="after_body_start">
|
365 |
<remove name="tealium_generic" />
|
@@ -375,15 +438,19 @@
|
|
375 |
</block>
|
376 |
</reference>
|
377 |
</sales_guest_printcreditmemo>
|
378 |
-
|
|
|
379 |
|
380 |
|
381 |
<!-- Add base tealium script on all pages, and the generic script -->
|
|
|
382 |
<default>
|
383 |
<reference name="after_body_start">
|
384 |
<block type="core/template" name="tealium_base" as="tealium_base" template="tealium_tags/base.phtml" />
|
385 |
<block type="core/template" name="tealium_generic" as="tealium_generic" template="tealium_tags/generic.phtml" before="tealium_base" />
|
386 |
</reference>
|
387 |
</default>
|
|
|
|
|
388 |
|
389 |
</layout>
|
1 |
<layout version="0.1.0">
|
2 |
|
3 |
+
<!--
|
4 |
|
5 |
Add specific blocks on all frontend pages
|
6 |
catalog
|
11 |
search
|
12 |
(and remove the generic code)
|
13 |
-->
|
14 |
+
|
15 |
<!-- Category Pages -->
|
16 |
+
|
17 |
<catalog_category_default>
|
18 |
<reference name="after_body_start">
|
19 |
<remove name="tealium_generic" />
|
27 |
<block type="catalog/category_view" name="tealium_category" as="tealium_category" template="tealium_tags/category.phtml" before="tealium_base" />
|
28 |
</reference>
|
29 |
</catalog_category_layered>
|
30 |
+
|
31 |
+
<!-- /Category Pages -->
|
32 |
+
|
33 |
|
34 |
<!-- Product Page -->
|
35 |
+
|
36 |
<catalog_product_view>
|
37 |
<reference name="after_body_start">
|
38 |
<remove name="tealium_generic" />
|
46 |
<block type="catalog/product_compare_list" name="tealium_catalog_product_compare_index" as="tealium_catalog_product_compare_index" template="tealium_tags/catalog_product_compare_index.phtml" before="tealium_base" />
|
47 |
</reference>
|
48 |
</catalog_product_compare_index>
|
49 |
+
|
50 |
+
<!-- /Product Page -->
|
51 |
+
|
52 |
|
53 |
<!-- SEO Sitemap -->
|
54 |
+
|
55 |
<catalog_seo_sitemap>
|
56 |
<!-- Covered by layouts below -->
|
57 |
</catalog_seo_sitemap>
|
103 |
</block>
|
104 |
</reference>
|
105 |
</catalog_seo_searchterm_popular>
|
106 |
+
|
107 |
+
<!-- /SEO Sitemap -->
|
108 |
+
|
109 |
|
110 |
<!-- Send to friend -->
|
111 |
+
|
112 |
<sendfriend_product_send>
|
113 |
<reference name="after_body_start">
|
114 |
<remove name="tealium_generic" />
|
115 |
<block type="sendfriend/send" name="tealium_product_send" as="tealium_product_send" template="tealium_tags/product_send.phtml" before="tealium_base" />
|
116 |
</reference>
|
117 |
</sendfriend_product_send>
|
118 |
+
|
119 |
+
<!-- /Send to friend -->
|
120 |
|
|
|
121 |
|
122 |
+
<!-- Customer -->
|
123 |
+
|
124 |
<customer_account>
|
125 |
<reference name="after_body_start">
|
126 |
<remove name="tealium_generic" />
|
132 |
</block>
|
133 |
</reference>
|
134 |
</customer_account>
|
135 |
+
|
136 |
+
<!-- /Customer -->
|
137 |
|
|
|
138 |
|
139 |
+
<!-- CMS -->
|
140 |
+
|
141 |
<cms_page>
|
142 |
<reference name="after_body_start">
|
143 |
<remove name="tealium_generic" />
|
149 |
</block>
|
150 |
</reference>
|
151 |
</cms_page>
|
152 |
+
|
153 |
+
<!-- /CMS -->
|
154 |
+
|
155 |
|
156 |
<!-- Checkout/Cart steps/Success -->
|
157 |
+
|
158 |
<checkout_cart_index>
|
159 |
<reference name="after_body_start">
|
160 |
<remove name="tealium_generic" />
|
175 |
<block type="checkout/onepage_success" name="checkout_onepage_success" as="checkout_onepage_success" template="tealium_tags/checkout_success.phtml" before="tealium_base" />
|
176 |
</reference>
|
177 |
</checkout_onepage_success>
|
178 |
+
|
179 |
+
<!-- /Checkout/Cart steps/Success -->
|
180 |
+
|
181 |
|
182 |
<!-- Multi-shipping uses same template as above -->
|
183 |
+
|
184 |
<checkout_multishipping>
|
185 |
<reference name="after_body_start">
|
186 |
<remove name="tealium_generic" />
|
187 |
<block type="core/template" name="tealium_checkout_onepage" as="tealium_checkout_onepage" template="tealium_tags/checkout_onepage.phtml" before="tealium_base" />
|
188 |
</reference>
|
189 |
</checkout_multishipping>
|
190 |
+
|
191 |
+
<!-- /Multi-shipping uses same template as above -->
|
192 |
|
193 |
|
194 |
<!-- Search/Advanced Search -->
|
195 |
+
|
196 |
<catalogsearch_result_index>
|
197 |
<reference name="after_body_start">
|
198 |
<remove name="tealium_generic" />
|
199 |
<block type="catalogsearch/result" name="tealium_catalogsearch_result_index" as="tealium_catalogsearch_result_index" template="tealium_tags/catalogsearch_result_index.phtml" before="tealium_base">
|
200 |
<block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
|
201 |
+
<action method="addColumnCountLayoutDepend">
|
202 |
+
<layout>empty</layout>
|
203 |
+
<count>6</count>
|
204 |
+
</action>
|
205 |
+
<action method="addColumnCountLayoutDepend">
|
206 |
+
<layout>one_column</layout>
|
207 |
+
<count>5</count>
|
208 |
+
</action>
|
209 |
+
<action method="addColumnCountLayoutDepend">
|
210 |
+
<layout>two_columns_left</layout>
|
211 |
+
<count>4</count>
|
212 |
+
</action>
|
213 |
+
<action method="addColumnCountLayoutDepend">
|
214 |
+
<layout>two_columns_right</layout>
|
215 |
+
<count>4</count>
|
216 |
+
</action>
|
217 |
+
<action method="addColumnCountLayoutDepend">
|
218 |
+
<layout>three_columns</layout>
|
219 |
+
<count>3</count>
|
220 |
+
</action>
|
221 |
+
<action method="setToolbarBlockName">
|
222 |
+
<name>product_list_toolbar</name>
|
223 |
+
</action>
|
224 |
</block>
|
225 |
<action method="setListOrders"/>
|
226 |
<action method="setListModes"/>
|
242 |
<block type="catalogsearch/term" name="tealium_catalogsearch_term_popular" as="tealium_catalogsearch_term_popular" template="tealium_tags/catalogsearch_term_popular.phtml" before="tealium_base" />
|
243 |
</reference>
|
244 |
</catalogsearch_term_popular>
|
245 |
+
|
246 |
+
<!-- /Search/Advanced Search -->
|
247 |
+
|
248 |
|
249 |
<!-- Tags -->
|
250 |
|
263 |
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
|
264 |
<block type="page/html_pager" name="product_list_toolbar_pager"/>
|
265 |
</block>
|
266 |
+
<action method="setToolbarBlockName">
|
267 |
+
<name>product_list_toolbar</name>
|
268 |
+
</action>
|
269 |
</block>
|
270 |
<action method="setListOrders"/>
|
271 |
<action method="setListModes"/>
|
273 |
</block>
|
274 |
</reference>
|
275 |
</tag_product_list>
|
276 |
+
|
277 |
+
<!-- /Tags -->
|
278 |
+
|
279 |
|
280 |
<!-- Guest Sales -->
|
281 |
|
294 |
</block>
|
295 |
</reference>
|
296 |
</sales_guest_form>
|
297 |
+
|
298 |
<sales_guest_view>
|
299 |
+
<reference name="after_body_start">
|
300 |
+
<remove name="tealium_generic" />
|
301 |
+
<block type="core/template" name="tealium_guest" as="tealium_guest" template="tealium_tags/guest_sales.phtml" before="tealium_base">
|
302 |
+
<action method="setData">
|
303 |
+
<name>tealium_type</name>
|
304 |
+
<value>sales guest view</value>
|
305 |
+
</action>
|
306 |
+
<action method="setData">
|
307 |
+
<name>tealium_name</name>
|
308 |
+
<value>Guest View order</value>
|
309 |
+
</action>
|
310 |
+
</block>
|
311 |
+
</reference>
|
312 |
+
</sales_guest_view>
|
313 |
+
|
314 |
+
<sales_guest_invoice>
|
315 |
+
<reference name="after_body_start">
|
316 |
+
<remove name="tealium_generic" />
|
317 |
+
<block type="core/template" name="tealium_guest" as="tealium_guest" template="tealium_tags/guest_sales.phtml" before="tealium_base">
|
318 |
+
<action method="setData">
|
319 |
+
<name>tealium_type</name>
|
320 |
+
<value>sales guest view invoice</value>
|
321 |
+
</action>
|
322 |
+
<action method="setData">
|
323 |
+
<name>tealium_name</name>
|
324 |
+
<value>Guest View Invoice</value>
|
325 |
+
</action>
|
326 |
+
</block>
|
327 |
+
</reference>
|
328 |
+
</sales_guest_invoice>
|
329 |
+
|
330 |
<sales_guest_shipment>
|
331 |
<reference name="after_body_start">
|
332 |
<remove name="tealium_generic" />
|
342 |
</block>
|
343 |
</reference>
|
344 |
</sales_guest_shipment>
|
345 |
+
|
346 |
<sales_guest_creditmemo>
|
347 |
<reference name="after_body_start">
|
348 |
<remove name="tealium_generic" />
|
358 |
</block>
|
359 |
</reference>
|
360 |
</sales_guest_creditmemo>
|
361 |
+
|
362 |
<sales_guest_reorder>
|
363 |
<reference name="after_body_start">
|
364 |
<remove name="tealium_generic" />
|
390 |
</block>
|
391 |
</reference>
|
392 |
</sales_guest_print>
|
393 |
+
|
394 |
<sales_guest_printinvoice>
|
395 |
<reference name="after_body_start">
|
396 |
<remove name="tealium_generic" />
|
406 |
</block>
|
407 |
</reference>
|
408 |
</sales_guest_printinvoice>
|
409 |
+
|
410 |
<sales_guest_printshipment>
|
411 |
<reference name="after_body_start">
|
412 |
<remove name="tealium_generic" />
|
422 |
</block>
|
423 |
</reference>
|
424 |
</sales_guest_printshipment>
|
425 |
+
|
426 |
<sales_guest_printcreditmemo>
|
427 |
<reference name="after_body_start">
|
428 |
<remove name="tealium_generic" />
|
438 |
</block>
|
439 |
</reference>
|
440 |
</sales_guest_printcreditmemo>
|
441 |
+
|
442 |
+
<!-- /Guest Sales -->
|
443 |
|
444 |
|
445 |
<!-- Add base tealium script on all pages, and the generic script -->
|
446 |
+
|
447 |
<default>
|
448 |
<reference name="after_body_start">
|
449 |
<block type="core/template" name="tealium_base" as="tealium_base" template="tealium_tags/base.phtml" />
|
450 |
<block type="core/template" name="tealium_generic" as="tealium_generic" template="tealium_tags/generic.phtml" before="tealium_base" />
|
451 |
</reference>
|
452 |
</default>
|
453 |
+
|
454 |
+
<!-- /Add base tealium script on all pages, and the generic script -->
|
455 |
|
456 |
</layout>
|
@@ -1,14 +1,18 @@
|
|
1 |
<?php
|
|
|
2 |
$helper = Mage::helper('tealium_tags');
|
3 |
$store = Mage::app()->getStore();
|
4 |
//$tealium = new $helper($store);
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
-
if (!$helper->getIsExternalScript($store)){
|
10 |
-
$tealium = $helper->getTealiumObject($store, $this);
|
11 |
-
echo $tealium->render("tag");
|
12 |
-
}
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
//$tealium = new $helper($store);
|
6 |
|
7 |
+
// if Tealium extension is not enabled, return immediately to not render
|
8 |
if (!$helper->isEnabled($store)) {
|
9 |
return; // not enabled, no javascript inserted
|
10 |
}
|
|
|
|
|
|
|
|
|
11 |
|
12 |
+
// load and use the external config if it's enabled, and render Tealium
|
13 |
+
// JavaScript code to the page.
|
14 |
+
if (!$helper->getIsExternalScript($store)) {
|
15 |
+
// get the udo and universal code snippet and render
|
16 |
+
$tealium = $helper->getTealiumObject($store, $this);
|
17 |
+
echo $tealium->render("tag");
|
18 |
+
}
|
@@ -3,6 +3,7 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
@@ -11,35 +12,41 @@ $ids = array();
|
|
11 |
$skus = array();
|
12 |
$names = array();
|
13 |
|
14 |
-
|
|
|
15 |
$ids[] = $item->getProductId();
|
16 |
$skus[] = $item->getSku();
|
17 |
$names[] = $item->getName();
|
18 |
}
|
19 |
-
|
|
|
20 |
$customData = array();
|
21 |
$customData["page_type"] = "product compare";
|
22 |
$customData["product_id"] = implode('","', $ids);
|
23 |
$customData["product_sku"] = implode('","', $skus);
|
24 |
$customData["product_name"] = implode('","', $names);
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
41 |
}
|
42 |
|
43 |
-
|
|
|
|
|
|
|
44 |
echo $helper->getDiagnosticTag($store);
|
45 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
12 |
$skus = array();
|
13 |
$names = array();
|
14 |
|
15 |
+
// populate info for each item into local variables
|
16 |
+
foreach ($this->getItems() as $item) {
|
17 |
$ids[] = $item->getProductId();
|
18 |
$skus[] = $item->getSku();
|
19 |
$names[] = $item->getName();
|
20 |
}
|
21 |
+
|
22 |
+
// set some custom data by imploding arrays of ids, skus, and names
|
23 |
$customData = array();
|
24 |
$customData["page_type"] = "product compare";
|
25 |
$customData["product_id"] = implode('","', $ids);
|
26 |
$customData["product_sku"] = implode('","', $skus);
|
27 |
$customData["product_name"] = implode('","', $names);
|
28 |
|
29 |
+
// create a tealium object for the page with custom data
|
30 |
+
$tealium = $helper->init($store, $this, "Home")
|
31 |
+
->addCustomDataFromSetup($store, "Home")
|
32 |
+
->addCustomDataFromObject($customData)
|
33 |
+
->getTealiumObject();
|
34 |
+
|
35 |
+
// load and use the external config if it's enabled, and render Tealium
|
36 |
+
// JavaScript code to the page.
|
37 |
+
if ($helper->getIsExternalScript($store)) {
|
38 |
+
$syncType = "sync";
|
39 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
40 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
41 |
+
$syncType = $externalScriptType;
|
42 |
+
}
|
43 |
+
echo $tealium->render("full", true, $syncType);
|
44 |
+
} else {
|
45 |
+
echo $tealium->render("udo");
|
46 |
}
|
47 |
|
48 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
49 |
+
// Render a tag in the form of an html <img> element that
|
50 |
+
// will send the url encoded udo to a specified server if the feature is
|
51 |
+
// enabled in the config.
|
52 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,18 +3,27 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
|
|
10 |
$terms = array();
|
11 |
|
12 |
$searchCriterias = $this->getSearchCriterias();
|
13 |
foreach (array('left', 'right') as $side) {
|
14 |
-
if(@$searchCriterias[$side]) {
|
15 |
-
foreach($searchCriterias[$side] as $criteria) {
|
16 |
-
$terms[] = $this
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
}
|
20 |
}
|
@@ -23,28 +32,34 @@ if (empty($terms)) {
|
|
23 |
$terms[] = "no-criteria";
|
24 |
}
|
25 |
|
|
|
26 |
$customData = array();
|
27 |
$customData["page_type"] = "advanced search results";
|
28 |
$customData["page_type"] = "advanced search";
|
29 |
$customData["search_results"] = $this->getResultCount();
|
30 |
$customData["search_keyword"] = implode('","', $terms);
|
31 |
|
|
|
32 |
$tealium = $helper->init($store, $this, "Search")->
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
if
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
}
|
45 |
-
|
46 |
-
|
|
|
47 |
}
|
48 |
|
|
|
|
|
|
|
|
|
49 |
echo $helper->getDiagnosticTag($store);
|
50 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// populate the "$terms" local variable with the search terms
|
12 |
$terms = array();
|
13 |
|
14 |
$searchCriterias = $this->getSearchCriterias();
|
15 |
foreach (array('left', 'right') as $side) {
|
16 |
+
if (@$searchCriterias[$side]) {
|
17 |
+
foreach ($searchCriterias[$side] as $criteria) {
|
18 |
+
$terms[] = $this
|
19 |
+
->htmlEscape(
|
20 |
+
$this
|
21 |
+
->helper('catalog')
|
22 |
+
->__($criteria['name'])
|
23 |
+
)
|
24 |
+
.":"
|
25 |
+
.$this
|
26 |
+
->htmlEscape($criteria['value']);
|
27 |
}
|
28 |
}
|
29 |
}
|
32 |
$terms[] = "no-criteria";
|
33 |
}
|
34 |
|
35 |
+
// set some custom data by imploding the terms
|
36 |
$customData = array();
|
37 |
$customData["page_type"] = "advanced search results";
|
38 |
$customData["page_type"] = "advanced search";
|
39 |
$customData["search_results"] = $this->getResultCount();
|
40 |
$customData["search_keyword"] = implode('","', $terms);
|
41 |
|
42 |
+
// create a tealium object for the page with custom data
|
43 |
$tealium = $helper->init($store, $this, "Search")->
|
44 |
+
addCustomDataFromSetup($store, "Search")->
|
45 |
+
addCustomDataFromObject($customData)->
|
46 |
+
getTealiumObject();
|
47 |
+
|
48 |
+
// load and use the external config if it's enabled, and render Tealium
|
49 |
+
// JavaScript code to the page.
|
50 |
+
if ($helper->getIsExternalScript($store)) {
|
51 |
+
$syncType = "sync";
|
52 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
53 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
54 |
+
$syncType = $externalScriptType;
|
55 |
+
}
|
56 |
+
echo $tealium->render("full", true, $syncType);
|
57 |
+
} else {
|
58 |
+
echo $tealium->render("udo");
|
59 |
}
|
60 |
|
61 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
62 |
+
// Render a tag in the form of an html <img> element that
|
63 |
+
// will send the url encoded udo to a specified server if the feature is
|
64 |
+
// enabled in the config.
|
65 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,25 +3,31 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
-
if
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
|
|
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
26 |
echo $helper->getDiagnosticTag($store);
|
27 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// create a tealium object for the page
|
12 |
+
$tealium = $helper->init($store, $this, "Search")
|
13 |
+
->addCustomDataFromSetup($store, "Search")
|
14 |
+
->getTealiumObject();
|
15 |
|
16 |
+
// load and use the external config if it's enabled, and render Tealium
|
17 |
+
// JavaScript code to the page.
|
18 |
+
if ($helper->getIsExternalScript($store)) {
|
19 |
+
$syncType = "sync";
|
20 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
21 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
22 |
+
$syncType = $externalScriptType;
|
23 |
+
}
|
24 |
+
echo $tealium->render("full", true, $syncType);
|
25 |
+
} else {
|
26 |
+
echo $tealium->render("udo");
|
27 |
}
|
28 |
|
29 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
30 |
+
// Render a tag in the form of an html <img> element that
|
31 |
+
// will send the url encoded udo to a specified server if the feature is
|
32 |
+
// enabled in the config.
|
33 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,13 +3,15 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
|
|
10 |
$terms = array();
|
11 |
|
12 |
-
if(
|
13 |
foreach ($this->getTerms() as $_term) {
|
14 |
$terms[] = $_term->getName();
|
15 |
}
|
@@ -17,27 +19,32 @@ if( sizeof($this->getTerms()) > 0 ) {
|
|
17 |
$terms[] = "no-terms";
|
18 |
}
|
19 |
|
|
|
20 |
$customData = array();
|
21 |
$customData["page_type"] = "popular search terms";
|
22 |
$customData["page_name"] = $this->getLayout()->getBlock('head')->getTitle();
|
23 |
$customData["search_keyword"] = implode('","', $terms);
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
}
|
38 |
-
|
39 |
-
|
|
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
42 |
echo $helper->getDiagnosticTag($store);
|
43 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// get the terms used
|
12 |
$terms = array();
|
13 |
|
14 |
+
if (sizeof($this->getTerms()) > 0) {
|
15 |
foreach ($this->getTerms() as $_term) {
|
16 |
$terms[] = $_term->getName();
|
17 |
}
|
19 |
$terms[] = "no-terms";
|
20 |
}
|
21 |
|
22 |
+
// initialize the custom data with popular search terms
|
23 |
$customData = array();
|
24 |
$customData["page_type"] = "popular search terms";
|
25 |
$customData["page_name"] = $this->getLayout()->getBlock('head')->getTitle();
|
26 |
$customData["search_keyword"] = implode('","', $terms);
|
27 |
|
28 |
+
// create a tealium object for the page
|
29 |
+
$tealium = $helper->init($store, $this, "Search")
|
30 |
+
->addCustomDataFromSetup($store, "Search")
|
31 |
+
->addCustomDataFromObject($customData)
|
32 |
+
->getTealiumObject();
|
33 |
+
|
34 |
+
// load and use the external config if it's enabled
|
35 |
+
if ($helper->getIsExternalScript($store)) {
|
36 |
+
$syncType = "sync";
|
37 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
38 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
39 |
+
$syncType = $externalScriptType;
|
40 |
+
}
|
41 |
+
echo $tealium->render("full", true, $syncType);
|
42 |
+
} else {
|
43 |
+
echo $tealium->render("udo");
|
44 |
}
|
45 |
|
46 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
47 |
+
// Render a tag in the form of an html <img> element that
|
48 |
+
// will send the url encoded udo to a specified server if the feature is
|
49 |
+
// enabled in the config.
|
50 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,25 +3,31 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
-
if
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
|
|
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
26 |
echo $helper->getDiagnosticTag($store);
|
27 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// create a tealium object for the page
|
12 |
+
$tealium = $helper->init($store, $this, "Category")
|
13 |
+
->addCustomDataFromSetup($store, "Category")
|
14 |
+
->getTealiumObject();
|
15 |
|
16 |
+
// load and use the external config if it's enabled, and render Tealium
|
17 |
+
// JavaScript code to the page.
|
18 |
+
if ($helper->getIsExternalScript($store)) {
|
19 |
+
$syncType = "sync";
|
20 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
21 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
22 |
+
$syncType = $externalScriptType;
|
23 |
+
}
|
24 |
+
echo $tealium->render("full", true, $syncType);
|
25 |
+
} else {
|
26 |
+
echo $tealium->render("udo");
|
27 |
}
|
28 |
|
29 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
30 |
+
// Render a tag in the form of an html <img> element that
|
31 |
+
// will send the url encoded udo to a specified server if the feature is
|
32 |
+
// enabled in the config.
|
33 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,25 +3,31 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
-
if
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
|
|
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
26 |
echo $helper->getDiagnosticTag($store);
|
27 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// create a tealium object for the page
|
12 |
+
$tealium = $helper->init($store, $this, "Cart")
|
13 |
+
->addCustomDataFromSetup($store, "Cart")
|
14 |
+
->getTealiumObject();
|
15 |
|
16 |
+
// load and use the external config if it's enabled, and render Tealium
|
17 |
+
// JavaScript code to the page.
|
18 |
+
if ($helper->getIsExternalScript($store)) {
|
19 |
+
$syncType = "sync";
|
20 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
21 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
22 |
+
$syncType = $externalScriptType;
|
23 |
+
}
|
24 |
+
echo $tealium->render("full", true, $syncType);
|
25 |
+
} else {
|
26 |
+
echo $tealium->render("udo");
|
27 |
}
|
28 |
|
29 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
30 |
+
// Render a tag in the form of an html <img> element that
|
31 |
+
// will send the url encoded udo to a specified server if the feature is
|
32 |
+
// enabled in the config.
|
33 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,38 +3,51 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
-
if
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
|
|
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
26 |
echo $helper->getDiagnosticTag($store);
|
|
|
|
|
27 |
$jsonUDO = $tealium->render("json");
|
28 |
|
29 |
if (!$helper->enableOnePageCheckout($store)) {
|
30 |
return; // not enabled, no javascript inserted
|
31 |
}
|
32 |
|
|
|
|
|
|
|
33 |
echo <<<EOD
|
34 |
<script type="text/javascript">
|
35 |
document.addEventListener('DOMContentLoaded',function(){
|
36 |
if(!!window.Checkout){
|
37 |
-
Checkout.prototype.namespaceOriginalGotoSection =
|
|
|
38 |
Checkout.prototype.gotoSection = function(section,reloadProgressBlock) {
|
39 |
utag.data=$jsonUDO;
|
40 |
utag.data["page_name"] = section;
|
@@ -46,26 +59,24 @@ document.addEventListener('DOMContentLoaded',function(){
|
|
46 |
});
|
47 |
</script>
|
48 |
|
49 |
-
EOD
|
50 |
|
51 |
-
|
52 |
-
?>
|
53 |
-
<?php
|
54 |
echo <<<EOD
|
55 |
<script type="text/javascript">
|
56 |
document.addEventListener('DOMContentLoaded',function(){
|
57 |
if (!!window.Review){
|
58 |
-
EOD
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
63 |
|
64 |
-
<?php
|
65 |
echo <<<EOD
|
66 |
}
|
67 |
});
|
68 |
</script>
|
69 |
-
EOD
|
70 |
-
?>
|
71 |
-
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// create a tealium object for the page
|
12 |
+
$tealium = $helper->init($store, $this, "Cart")
|
13 |
+
->addCustomDataFromSetup($store, "Cart")
|
14 |
+
->getTealiumObject();
|
15 |
|
16 |
+
// load and use the external config if it's enabled, and render Tealium
|
17 |
+
// JavaScript code to the page.
|
18 |
+
if ($helper->getIsExternalScript($store)) {
|
19 |
+
$syncType = "sync";
|
20 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
21 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
22 |
+
$syncType = $externalScriptType;
|
23 |
+
}
|
24 |
+
echo $tealium->render("full", true, $syncType);
|
25 |
+
} else {
|
26 |
+
echo $tealium->render("udo");
|
27 |
}
|
28 |
|
29 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
30 |
+
// Render a tag in the form of an html <img> element that
|
31 |
+
// will send the url encoded udo to a specified server if the feature is
|
32 |
+
// enabled in the config.
|
33 |
echo $helper->getDiagnosticTag($store);
|
34 |
+
|
35 |
+
// get the udo as a json object
|
36 |
$jsonUDO = $tealium->render("json");
|
37 |
|
38 |
if (!$helper->enableOnePageCheckout($store)) {
|
39 |
return; // not enabled, no javascript inserted
|
40 |
}
|
41 |
|
42 |
+
// The onepage checkout has other special udo requirements.
|
43 |
+
// Render some JavaScript that on the content loaded DOM event
|
44 |
+
// will set the udo.
|
45 |
echo <<<EOD
|
46 |
<script type="text/javascript">
|
47 |
document.addEventListener('DOMContentLoaded',function(){
|
48 |
if(!!window.Checkout){
|
49 |
+
Checkout.prototype.namespaceOriginalGotoSection =
|
50 |
+
Checkout.prototype.gotoSection;
|
51 |
Checkout.prototype.gotoSection = function(section,reloadProgressBlock) {
|
52 |
utag.data=$jsonUDO;
|
53 |
utag.data["page_name"] = section;
|
59 |
});
|
60 |
</script>
|
61 |
|
62 |
+
EOD;
|
63 |
|
|
|
|
|
|
|
64 |
echo <<<EOD
|
65 |
<script type="text/javascript">
|
66 |
document.addEventListener('DOMContentLoaded',function(){
|
67 |
if (!!window.Review){
|
68 |
+
EOD;
|
69 |
+
|
70 |
+
echo "review = new Review('" .
|
71 |
+
$this->getUrl('checkout/onepage/saveOrder', array(
|
72 |
+
'form_key' => Mage::getSingleton('core/session')->getFormKey()
|
73 |
+
)) .
|
74 |
+
"', '" .
|
75 |
+
$this->getUrl('checkout/onepage/success') .
|
76 |
+
"', $('checkout-agreements'));";
|
77 |
|
|
|
78 |
echo <<<EOD
|
79 |
}
|
80 |
});
|
81 |
</script>
|
82 |
+
EOD;
|
|
|
|
@@ -3,20 +3,26 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
-
if
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
21 |
echo $helper->getDiagnosticTag($store);
|
22 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// create a tealium object for the page
|
12 |
+
$tealium = $helper->init($store, $this, "Confirmation")
|
13 |
+
->addCustomDataFromSetup($store, "Confirmation")
|
14 |
+
->getTealiumObject();
|
15 |
|
16 |
+
// load and use the external config if it's enabled, and render Tealium
|
17 |
+
// JavaScript code to the page.
|
18 |
+
if ($helper->getIsExternalScript($store)) {
|
19 |
+
echo $tealium->render("full", false);
|
20 |
+
} else {
|
21 |
+
echo $tealium->render("udo");
|
22 |
}
|
23 |
|
24 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
25 |
+
// Render a tag in the form of an html <img> element that
|
26 |
+
// will send the url encoded udo to a specified server if the feature is
|
27 |
+
// enabled in the config.
|
28 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,25 +3,31 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
-
if
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
|
|
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
26 |
echo $helper->getDiagnosticTag($store);
|
27 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// create a tealium object for the page
|
12 |
+
$tealium = $helper->init($store, $this, "Home")
|
13 |
+
->addCustomDataFromSetup($store, "Home")
|
14 |
+
->getTealiumObject();
|
15 |
|
16 |
+
// load and use the external config if it's enabled, and render Tealium
|
17 |
+
// JavaScript code to the page.
|
18 |
+
if ($helper->getIsExternalScript($store)) {
|
19 |
+
$syncType = "sync";
|
20 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
21 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
22 |
+
$syncType = $externalScriptType;
|
23 |
+
}
|
24 |
+
echo $tealium->render("full", true, $syncType);
|
25 |
+
} else {
|
26 |
+
echo $tealium->render("udo");
|
27 |
}
|
28 |
|
29 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
30 |
+
// Render a tag in the form of an html <img> element that
|
31 |
+
// will send the url encoded udo to a specified server if the feature is
|
32 |
+
// enabled in the config.
|
33 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,25 +3,31 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
-
if
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
|
|
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
26 |
echo $helper->getDiagnosticTag($store);
|
27 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// create a tealium object for the page
|
12 |
+
$tealium = $helper->init($store, $this, "Customer")
|
13 |
+
->addCustomDataFromSetup($store, "Customer")
|
14 |
+
->getTealiumObject();
|
15 |
|
16 |
+
// load and use the external config if it's enabled, and render Tealium
|
17 |
+
// JavaScript code to the page.
|
18 |
+
if ($helper->getIsExternalScript($store)) {
|
19 |
+
$syncType = "sync";
|
20 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
21 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
22 |
+
$syncType = $externalScriptType;
|
23 |
+
}
|
24 |
+
echo $tealium->render("full", true, $syncType);
|
25 |
+
} else {
|
26 |
+
echo $tealium->render("udo");
|
27 |
}
|
28 |
|
29 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
30 |
+
// Render a tag in the form of an html <img> element that
|
31 |
+
// will send the url encoded udo to a specified server if the feature is
|
32 |
+
// enabled in the config.
|
33 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,37 +3,41 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
|
|
10 |
$tealium = $helper->getTealiumObject($store, $this);
|
11 |
-
if(preg_match('/checkout.+success|success.+checkout/i'
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
16 |
-
else{
|
17 |
-
$customData = array();
|
18 |
-
$customData["page_type"] = "generic";
|
19 |
-
$tealium = $helper->init($store, $this, "Home")->
|
20 |
-
addCustomDataFromSetup($store, "Home")->
|
21 |
-
addCustomDataFromObject($customData)->
|
22 |
-
getTealiumObject();
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
$syncType = $externalScriptType;
|
31 |
-
}
|
32 |
-
echo $tealium->render("full", true, $syncType);
|
33 |
-
}
|
34 |
-
else {
|
35 |
-
echo $tealium->render("udo");
|
36 |
-
}
|
37 |
-
|
38 |
echo $helper->getDiagnosticTag($store);
|
39 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// create a tealium object for the page
|
12 |
$tealium = $helper->getTealiumObject($store, $this);
|
13 |
+
if (preg_match('/checkout.+success|success.+checkout/i', $_SERVER['PHP_SELF'])) {
|
14 |
+
$tealium = $helper->init($store, $this, "Confirmation")
|
15 |
+
->addCustomDataFromSetup($store, "Confirmation")
|
16 |
+
->getTealiumObject();
|
17 |
+
} else {
|
18 |
+
$customData = array();
|
19 |
+
$customData["page_type"] = "generic";
|
20 |
+
$tealium = $helper->init($store, $this, "Home")
|
21 |
+
->addCustomDataFromSetup($store, "Home")
|
22 |
+
->addCustomDataFromObject($customData)
|
23 |
+
->getTealiumObject();
|
24 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
+
// load and use the external config if it's enabled, and render Tealium
|
27 |
+
// JavaScript code to the page.
|
28 |
+
if ($helper->getIsExternalScript($store)) {
|
29 |
+
$syncType = "sync";
|
30 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
31 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
32 |
+
$syncType = $externalScriptType;
|
33 |
+
}
|
34 |
+
echo $tealium->render("full", true, $syncType);
|
35 |
+
} else {
|
36 |
+
echo $tealium->render("udo");
|
37 |
}
|
38 |
|
39 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
40 |
+
// Render a tag in the form of an html <img> element that
|
41 |
+
// will send the url encoded udo to a specified server if the feature is
|
42 |
+
// enabled in the config.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,28 +3,36 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
|
|
10 |
$customData = array();
|
11 |
$customData["page_name"] = $this->getTealiumName();
|
12 |
-
$tealium = $helper->init($store, $this, "Home")->
|
13 |
-
addCustomDataFromSetup($store, "Home")->
|
14 |
-
addCustomDataFromObject($customData)->
|
15 |
-
getTealiumObject();
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
}
|
28 |
|
|
|
|
|
|
|
|
|
29 |
echo $helper->getDiagnosticTag($store);
|
30 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// set the page name in the custom data
|
12 |
$customData = array();
|
13 |
$customData["page_name"] = $this->getTealiumName();
|
|
|
|
|
|
|
|
|
14 |
|
15 |
+
// create a tealium object for the page
|
16 |
+
$tealium = $helper->init($store, $this, "Home")
|
17 |
+
->addCustomDataFromSetup($store, "Home")
|
18 |
+
->addCustomDataFromObject($customData)
|
19 |
+
->getTealiumObject();
|
20 |
+
|
21 |
+
// load and use the external config if it's enabled, and render Tealium
|
22 |
+
// JavaScript code to the page.
|
23 |
+
if ($helper->getIsExternalScript($store)) {
|
24 |
+
$syncType = "sync";
|
25 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
26 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
27 |
+
$syncType = $externalScriptType;
|
28 |
+
}
|
29 |
+
echo $tealium->render("full", true, $syncType);
|
30 |
+
} else {
|
31 |
+
echo $tealium->render("udo");
|
32 |
}
|
33 |
|
34 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
35 |
+
// Render a tag in the form of an html <img> element that
|
36 |
+
// will send the url encoded udo to a specified server if the feature is
|
37 |
+
// enabled in the config.
|
38 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,25 +3,31 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
-
if
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
|
|
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
26 |
echo $helper->getDiagnosticTag($store);
|
27 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// create a tealium object for the page
|
12 |
+
$tealium = $helper->init($store, $this, "ProductPage")
|
13 |
+
->addCustomDataFromSetup($store, "ProductPage")
|
14 |
+
->getTealiumObject();
|
15 |
|
16 |
+
// load and use the external config if it's enabled, and render Tealium
|
17 |
+
// JavaScript code to the page.
|
18 |
+
if ($helper->getIsExternalScript($store)) {
|
19 |
+
$syncType = "sync";
|
20 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
21 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
22 |
+
$syncType = $externalScriptType;
|
23 |
+
}
|
24 |
+
echo $tealium->render("full", true, $syncType);
|
25 |
+
} else {
|
26 |
+
echo $tealium->render("udo");
|
27 |
}
|
28 |
|
29 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
30 |
+
// Render a tag in the form of an html <img> element that
|
31 |
+
// will send the url encoded udo to a specified server if the feature is
|
32 |
+
// enabled in the config.
|
33 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,6 +3,7 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
@@ -12,6 +13,7 @@ $_category_id = $this->getCategoryId();
|
|
12 |
$_product = Mage::getModel('catalog/product')->load($_product_id);
|
13 |
$_category = Mage::getModel('catalog/category')->load($_category_id);
|
14 |
|
|
|
15 |
$customData = array();
|
16 |
$customData["page_name"] = $_product->getName();
|
17 |
$customData["page_type"] = "product send";
|
@@ -19,26 +21,34 @@ $customData["product_id"] = $_product->getId();
|
|
19 |
$customData["product_sku"] = $_product->getSku();
|
20 |
$customData["product_name"] = $_product->getName();
|
21 |
$customData["product_brand"] = $_product->getBrand();
|
22 |
-
$customData["product_category"] =
|
23 |
-
$
|
24 |
-
$customData["
|
|
|
|
|
|
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
30 |
|
31 |
-
if
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
}
|
39 |
-
|
40 |
-
|
|
|
41 |
}
|
42 |
|
|
|
|
|
|
|
|
|
43 |
echo $helper->getDiagnosticTag($store);
|
44 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
13 |
$_product = Mage::getModel('catalog/product')->load($_product_id);
|
14 |
$_category = Mage::getModel('catalog/category')->load($_category_id);
|
15 |
|
16 |
+
// set custom data with product information
|
17 |
$customData = array();
|
18 |
$customData["page_name"] = $_product->getName();
|
19 |
$customData["page_type"] = "product send";
|
21 |
$customData["product_sku"] = $_product->getSku();
|
22 |
$customData["product_name"] = $_product->getName();
|
23 |
$customData["product_brand"] = $_product->getBrand();
|
24 |
+
$customData["product_category"] =
|
25 |
+
$_category ? $_category->getName() : 'no_category';
|
26 |
+
$customData["product_unit_price"] =
|
27 |
+
number_format($_product->getSpecialPrice() ? : "", 2, "");
|
28 |
+
$customData["product_list_price"] =
|
29 |
+
number_format($_product->getPrice()? : "", 2, "");
|
30 |
|
31 |
+
// create a tealium object for the page
|
32 |
+
$tealium = $helper->init($store, $this, "ProductPage")
|
33 |
+
->addCustomDataFromSetup($store, "Home")
|
34 |
+
->addCustomDataFromObject($customData)
|
35 |
+
->getTealiumObject();
|
36 |
|
37 |
+
// load and use the external config if it's enabled, and render Tealium
|
38 |
+
// JavaScript code to the page.
|
39 |
+
if ($helper->getIsExternalScript($store)) {
|
40 |
+
$syncType = "sync";
|
41 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
42 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
43 |
+
$syncType = $externalScriptType;
|
44 |
+
}
|
45 |
+
echo $tealium->render("full", true, $syncType);
|
46 |
+
} else {
|
47 |
+
echo $tealium->render("udo");
|
48 |
}
|
49 |
|
50 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
51 |
+
// Render a tag in the form of an html <img> element that
|
52 |
+
// will send the url encoded udo to a specified server if the feature is
|
53 |
+
// enabled in the config.
|
54 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,25 +3,31 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
-
if
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
|
|
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
26 |
echo $helper->getDiagnosticTag($store);
|
27 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// create a tealium object for the page
|
12 |
+
$tealium = $helper->init($store, $this, "Home")
|
13 |
+
->addCustomDataFromSetup($store, "Home")
|
14 |
+
->getTealiumObject();
|
15 |
|
16 |
+
// load and use the external config if it's enabled, and render Tealium
|
17 |
+
// JavaScript code to the page.
|
18 |
+
if ($helper->getIsExternalScript($store)) {
|
19 |
+
$syncType = "sync";
|
20 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
21 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
22 |
+
$syncType = $externalScriptType;
|
23 |
+
}
|
24 |
+
echo $tealium->render("full", true, $syncType);
|
25 |
+
} else {
|
26 |
+
echo $tealium->render("udo");
|
27 |
}
|
28 |
|
29 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
30 |
+
// Render a tag in the form of an html <img> element that
|
31 |
+
// will send the url encoded udo to a specified server if the feature is
|
32 |
+
// enabled in the config.
|
33 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,13 +3,14 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
10 |
$tags = array();
|
11 |
|
12 |
-
if(
|
13 |
foreach ($this->getTags()as $name => $tag) {
|
14 |
$tags[] = $name;
|
15 |
}
|
@@ -17,27 +18,33 @@ if( sizeof($this->getTags()) > 0 ) {
|
|
17 |
$tags[] = "no-tags";
|
18 |
}
|
19 |
|
|
|
20 |
$customData = array();
|
21 |
$customData["page_type"] = "tag list";
|
22 |
$customData["page_name"] = $this->getLayout()->getBlock('head')->getTitle();
|
23 |
$customData["search_keyword"] = implode('","', $tags);
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
42 |
echo $helper->getDiagnosticTag($store);
|
43 |
-
?>
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
$tags = array();
|
12 |
|
13 |
+
if (sizeof($this->getTags()) > 0) {
|
14 |
foreach ($this->getTags()as $name => $tag) {
|
15 |
$tags[] = $name;
|
16 |
}
|
18 |
$tags[] = "no-tags";
|
19 |
}
|
20 |
|
21 |
+
// initialize custom data
|
22 |
$customData = array();
|
23 |
$customData["page_type"] = "tag list";
|
24 |
$customData["page_name"] = $this->getLayout()->getBlock('head')->getTitle();
|
25 |
$customData["search_keyword"] = implode('","', $tags);
|
26 |
|
27 |
+
// create a tealium object for the page
|
28 |
+
$tealium = $helper->init($store, $this, "Search")
|
29 |
+
->addCustomDataFromSetup($store, "Search")
|
30 |
+
->addCustomDataFromObject($customData)
|
31 |
+
->getTealiumObject();
|
32 |
+
|
33 |
+
// load and use the external config if it's enabled, and render Tealium
|
34 |
+
// JavaScript code to the page.
|
35 |
+
if ($helper->getIsExternalScript($store)) {
|
36 |
+
$syncType = "sync";
|
37 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
38 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
39 |
+
$syncType = $externalScriptType;
|
40 |
+
}
|
41 |
+
echo $tealium->render("full", true, $syncType);
|
42 |
+
} else {
|
43 |
+
echo $tealium->render("udo");
|
44 |
}
|
45 |
|
46 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
47 |
+
// Render a tag in the form of an html <img> element that
|
48 |
+
// will send the url encoded udo to a specified server if the feature is
|
49 |
+
// enabled in the config.
|
50 |
echo $helper->getDiagnosticTag($store);
|
|
@@ -3,30 +3,37 @@
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
|
|
6 |
if (!$helper->isEnabled($store)) {
|
7 |
return; // not enabled, no javascript inserted
|
8 |
}
|
9 |
|
|
|
10 |
$customData = array();
|
11 |
$customData["page_type"] = "tag product list";
|
12 |
$customData["page_name"] = $this->getLayout()->getBlock('head')->getTitle();
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
18 |
|
19 |
-
if
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
}
|
27 |
-
|
28 |
-
|
|
|
29 |
}
|
30 |
|
31 |
-
|
32 |
-
|
|
|
|
|
|
3 |
$helper = Mage::helper('tealium_tags');
|
4 |
$store = Mage::app()->getStore();
|
5 |
|
6 |
+
// if Tealium extension is not enabled, return immediately to not render
|
7 |
if (!$helper->isEnabled($store)) {
|
8 |
return; // not enabled, no javascript inserted
|
9 |
}
|
10 |
|
11 |
+
// initialize custom data
|
12 |
$customData = array();
|
13 |
$customData["page_type"] = "tag product list";
|
14 |
$customData["page_name"] = $this->getLayout()->getBlock('head')->getTitle();
|
15 |
|
16 |
+
// create a tealium object for the page
|
17 |
+
$tealium = $helper->init($store, $this, "Search")
|
18 |
+
->addCustomDataFromSetup($store, "Search")
|
19 |
+
->addCustomDataFromObject($customData)
|
20 |
+
->getTealiumObject();
|
21 |
|
22 |
+
// load and use the external config if it's enabled, and render Tealium
|
23 |
+
// JavaScript code to the page.
|
24 |
+
if ($helper->getIsExternalScript($store)) {
|
25 |
+
$syncType = "sync";
|
26 |
+
$externalScriptType = $helper->getExternalScriptType($store);
|
27 |
+
if ($externalScriptType == "sync" || $externalScriptType == "async") {
|
28 |
+
$syncType = $externalScriptType;
|
29 |
+
}
|
30 |
+
echo $tealium->render("full", true, $syncType);
|
31 |
+
} else {
|
32 |
+
echo $tealium->render("udo");
|
33 |
}
|
34 |
|
35 |
+
// Sometimes it's useful to send the entire udo to a server for diagnostics.
|
36 |
+
// Render a tag in the form of an html <img> element that
|
37 |
+
// will send the url encoded udo to a specified server if the feature is
|
38 |
+
// enabled in the config.
|
39 |
+
echo $helper->getDiagnosticTag($store);
|
@@ -1,10 +1,10 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
</config>
|
1 |
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
+
<modules>
|
4 |
+
<Tealium_Tags>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
<version>2.0.6</version>
|
8 |
+
</Tealium_Tags>
|
9 |
+
</modules>
|
10 |
</config>
|
@@ -1,220 +1,224 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Tealium
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
<!-- Tealium Universal Data Object / Data Layer -->
|
101 |
<script type="text/javascript">
|
102 |
-
|
103 |
</script>
|
104 |
<!-- ****************************************** -->
|
105 |
EOD;
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
EOD;
|
117 |
-
|
|
|
|
|
118 |
<!-- Async Load of Tealium utag.js library -->
|
119 |
<script type="text/javascript">
|
120 |
-
|
121 |
</script>
|
122 |
<!-- ************************************* -->
|
123 |
EOD;
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
<!-- Tealium Universal Data Object / Data Layer -->
|
147 |
<!-- Account, profile, or environment was not declared in
|
148 |
object Tealium(\$account, \$profile, \$target, \$pageType) -->
|
149 |
EOD;
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
}
|
156 |
-
|
157 |
-
// Open source alternative for json_encode for PHP < 5.4 ***********************************************
|
158 |
-
if (! function_exists ( 'json_encode' )) {
|
159 |
-
function json_encode($a = false) {
|
160 |
-
if (is_null ( $a ))
|
161 |
-
return 'null';
|
162 |
-
if ($a === false)
|
163 |
-
return 'false';
|
164 |
-
if ($a === true)
|
165 |
-
return 'true';
|
166 |
-
if (is_scalar ( $a )) {
|
167 |
-
if (is_float ( $a )) {
|
168 |
-
// Always use "." for floats.
|
169 |
-
return floatval ( str_replace ( ",", ".", strval ( $a ) ) );
|
170 |
-
}
|
171 |
-
if (is_string ( $a )) {
|
172 |
-
static $jsonReplaces = array (
|
173 |
-
array (
|
174 |
-
"\\",
|
175 |
-
"/",
|
176 |
-
"\n",
|
177 |
-
"\t",
|
178 |
-
"\r",
|
179 |
-
"\b",
|
180 |
-
"\f",
|
181 |
-
'"'
|
182 |
-
),
|
183 |
-
array (
|
184 |
-
'\\\\',
|
185 |
-
'\\/',
|
186 |
-
'\\n',
|
187 |
-
'\\t',
|
188 |
-
'\\r',
|
189 |
-
'\\b',
|
190 |
-
'\\f',
|
191 |
-
'\"'
|
192 |
-
)
|
193 |
-
);
|
194 |
-
return '"' . str_replace ( $jsonReplaces [0], $jsonReplaces [1], $a ) . '"';
|
195 |
-
} else
|
196 |
-
return $a;
|
197 |
-
}
|
198 |
-
$isList = true;
|
199 |
-
for($i = 0, reset ( $a ); $i < count ( $a ); $i ++, next ( $a )) {
|
200 |
-
if (key ( $a ) !== $i) {
|
201 |
-
$isList = false;
|
202 |
-
break;
|
203 |
-
}
|
204 |
-
}
|
205 |
-
$result = array ();
|
206 |
-
if ($isList) {
|
207 |
-
foreach ( $a as $v )
|
208 |
-
$result [] = json_encode ( $v );
|
209 |
-
return '[' . join ( ',', $result ) . ']';
|
210 |
-
} else {
|
211 |
-
foreach ( $a as $k => $v )
|
212 |
-
$result [] = json_encode ( $k ) . ':' . json_encode ( $v );
|
213 |
-
return '{' . join ( ',', $result ) . '}';
|
214 |
-
}
|
215 |
-
}
|
216 |
-
}
|
217 |
-
// ***********************************************************************************************************
|
218 |
-
|
219 |
-
?>
|
220 |
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Tealium
|
4 |
+
{
|
5 |
+
// Declare related properties and define constructor
|
6 |
+
private $account; // account name
|
7 |
+
private $profile; // profile name
|
8 |
+
private $target;
|
9 |
+
private $udo; // object (assoc array) of udo variables (key/val pairs)
|
10 |
+
private $udoElements;
|
11 |
+
private $customUdo;
|
12 |
+
|
13 |
+
public function __construct(
|
14 |
+
$accountInit = false,
|
15 |
+
$profileInit = false,
|
16 |
+
$targetInit = false,
|
17 |
+
$pageType = "Home",
|
18 |
+
&$data = array()
|
19 |
+
) {
|
20 |
+
require_once 'TealiumInit.php';
|
21 |
+
|
22 |
+
$this->udoElements = $udoElements;
|
23 |
+
$this->account = $accountInit;
|
24 |
+
$this->profile = $profileInit;
|
25 |
+
$this->target = $targetInit;
|
26 |
+
|
27 |
+
if (
|
28 |
+
!($this->udo = $this->udoElements[$pageType])
|
29 |
+
&& $pageType != null
|
30 |
+
) {
|
31 |
+
$this->udo = array('page_type' => $pageType);
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
// give an object of key value pairs to update in the udo,
|
36 |
+
// or provide a key string and value string of a single udo var to update
|
37 |
+
public function updateUdo($objectOrKey = "", $value = "")
|
38 |
+
{
|
39 |
+
// get udo and put in local scope as "$udoObject"
|
40 |
+
$udoObject = $this->udo;
|
41 |
+
|
42 |
+
// set "$udo" depending on form of "$udoObject"
|
43 |
+
if ($udoObject instanceof Closure) {
|
44 |
+
$udo = $udoObject();
|
45 |
+
} elseif (is_array($udoObject)) {
|
46 |
+
$udo = $udoObject;
|
47 |
+
} else {
|
48 |
+
$udo = "{}";
|
49 |
+
}
|
50 |
+
|
51 |
+
// "$updatedUdo" is an object of key/val pairs of vars to be updated
|
52 |
+
// in the udo. It describes just the modifications to the current udo
|
53 |
+
// so that it can be updated. (could probably be better named)
|
54 |
+
if ($objectOrKey instanceof Closure) {
|
55 |
+
$updatedUdo = $objectOrKey();
|
56 |
+
} elseif (is_array($objectOrKey)) {
|
57 |
+
$updatedUdo = $objectOrKey;
|
58 |
+
} else {
|
59 |
+
// in string form $updateUdo indicates to use $objectOrKey
|
60 |
+
// as a key/val pair
|
61 |
+
$updatedUdo = "{}";
|
62 |
+
}
|
63 |
+
|
64 |
+
// if $updatedUdo is an assoc array, iterate through its key/val
|
65 |
+
// pairs and update the udo
|
66 |
+
if (is_array($updatedUdo)) {
|
67 |
+
foreach ($updatedUdo as $objectKey => $objectValue) {
|
68 |
+
$udo[$objectKey] = $objectValue;
|
69 |
+
}
|
70 |
+
} elseif ($objectOrKey != "") {
|
71 |
+
// else use function params as a key/val to update
|
72 |
+
$udo[$objectOrKey] = $value;
|
73 |
+
}
|
74 |
+
|
75 |
+
// set and return the updated udo
|
76 |
+
$this->udo = $udo;
|
77 |
+
|
78 |
+
return $this->udo;
|
79 |
+
}
|
80 |
+
|
81 |
+
// take a new udo and replace the old one
|
82 |
+
public function setCustomUdo($udo)
|
83 |
+
{
|
84 |
+
$this->customUdo = $udo;
|
85 |
+
}
|
86 |
+
|
87 |
+
// set a new page type
|
88 |
+
public function pageType($pageType = "Home")
|
89 |
+
{
|
90 |
+
$this->udo = $this->udoElements[$pageType];
|
91 |
+
if (!$this->udo && $pageType != null) {
|
92 |
+
$this->udo = array('page_type' => $pageType);
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
public function render($type = null, $external = false, $sync = "sync")
|
97 |
+
{
|
98 |
+
// check if the tealium api is being used and render just the data layer
|
99 |
+
if (
|
100 |
+
!(
|
101 |
+
isset($_REQUEST["tealium_api"])
|
102 |
+
&& $_REQUEST["tealium_api"] == "true"
|
103 |
+
)
|
104 |
+
&& $external
|
105 |
+
) {
|
106 |
+
// not using the api, and the script is an external script
|
107 |
+
// instead of setting utag_data with a udo object, include
|
108 |
+
// the external script instead
|
109 |
+
$type = "udo";
|
110 |
+
$is_async = ($sync == "sync") ? "" : "async";
|
111 |
+
$udo = "<script type=\"text/javascript\" src=\"";
|
112 |
+
$udo .= $_SERVER["REQUEST_URI"];
|
113 |
+
|
114 |
+
if ($_SERVER["QUERY_STRING"]) {
|
115 |
+
// append more query params with '&' if query params exist
|
116 |
+
$udo .= "&";
|
117 |
+
} else {
|
118 |
+
// else start query params with a '?'
|
119 |
+
$udo .= "?";
|
120 |
+
}
|
121 |
+
|
122 |
+
// append the "tealium_api=true" query param to the url
|
123 |
+
$udo .= "tealium_api=true\" $is_async></script>";
|
124 |
+
} else {
|
125 |
+
// Either using the api, the udo is not an external script, or both.
|
126 |
+
// Therefore the udo object must be generated as javascript code.
|
127 |
+
|
128 |
+
// include any customizations
|
129 |
+
if (isset($this->customUdo)) {
|
130 |
+
$this->updateUdo($this->customUdo);
|
131 |
+
}
|
132 |
+
|
133 |
+
$udoObject = $this->udo;
|
134 |
+
|
135 |
+
// determine the udo obj's type and convert to JSON
|
136 |
+
if ($udoObject instanceof Closure) {
|
137 |
+
// pretty print in versions of php that support it
|
138 |
+
if(defined('JSON_PRETTY_PRINT')) {
|
139 |
+
$udoJson = json_encode($udoObject(), JSON_PRETTY_PRINT);
|
140 |
+
} else {
|
141 |
+
$udoJson = json_encode($udoObject());
|
142 |
+
}
|
143 |
+
} elseif (is_array($udoObject)) {
|
144 |
+
// pretty print in versions of php that support it
|
145 |
+
if(defined('JSON_PRETTY_PRINT')) {
|
146 |
+
$udoJson = json_encode($udoObject, JSON_PRETTY_PRINT);
|
147 |
+
} else {
|
148 |
+
$udoJson = json_encode($udoObject);
|
149 |
+
}
|
150 |
+
} else {
|
151 |
+
$udoJson = "{}";
|
152 |
+
}
|
153 |
+
|
154 |
+
// create the javascript for utag_data
|
155 |
+
$udoJs = "var utag_data = $udoJson;";
|
156 |
+
|
157 |
+
// create the entire script tag to render for utag_data
|
158 |
+
$udo = <<<EOD
|
159 |
<!-- Tealium Universal Data Object / Data Layer -->
|
160 |
<script type="text/javascript">
|
161 |
+
$udoJs
|
162 |
</script>
|
163 |
<!-- ****************************************** -->
|
164 |
EOD;
|
165 |
+
}
|
166 |
+
|
167 |
+
// Render Tealium tag in javaScript
|
168 |
+
$insert_tag = <<<EOD
|
169 |
+
(function(a,b,c,d){
|
170 |
+
a='//tags.tiqcdn.com/utag/$this->account/$this->profile/$this->target/utag.js';
|
171 |
+
b=document;c='script';d=b.createElement(c);d.src=a;d.type='text/java'+c;
|
172 |
+
d.async=true;
|
173 |
+
a=b.getElementsByTagName(c)[0];a.parentNode.insertBefore(d,a);
|
174 |
+
})();
|
175 |
EOD;
|
176 |
+
|
177 |
+
// enclose the tealium tag js in a <script></script> tag
|
178 |
+
$tag = <<<EOD
|
179 |
<!-- Async Load of Tealium utag.js library -->
|
180 |
<script type="text/javascript">
|
181 |
+
$insert_tag
|
182 |
</script>
|
183 |
<!-- ************************************* -->
|
184 |
EOD;
|
185 |
+
|
186 |
+
// if using the tealium_api, return a page with only the javascript
|
187 |
+
if (
|
188 |
+
isset($_REQUEST["tealium_api"])
|
189 |
+
&& $_REQUEST["tealium_api"] == "true"
|
190 |
+
) {
|
191 |
+
$tag = "\n\n" . $insert_tag . "\n//TEALIUM_END\n";
|
192 |
+
$udo = "//TEALIUM_START\n" . "\n" . $udoJs;
|
193 |
+
}
|
194 |
+
|
195 |
+
// Determine what code to return
|
196 |
+
if ($this->account && $this->profile && $this->target) {
|
197 |
+
if ($type == "tag") {
|
198 |
+
$renderedCode = $tag;
|
199 |
+
} elseif ($type == "udo") {
|
200 |
+
// starts with "var utag_data = " followed by json
|
201 |
+
$renderedCode = $udo;
|
202 |
+
} elseif ($type == "json") {
|
203 |
+
// just the json object
|
204 |
+
$renderedCode = $udoJson;
|
205 |
+
} else {
|
206 |
+
$renderedCode = $udo . "\n" . $tag;
|
207 |
+
}
|
208 |
+
} else {
|
209 |
+
if ($this->udo != null) {
|
210 |
+
$renderedCode = $udo;
|
211 |
+
} else {
|
212 |
+
// Render instructions if Tealium Object was not used correctly
|
213 |
+
$renderedCode = <<<EOD
|
214 |
<!-- Tealium Universal Data Object / Data Layer -->
|
215 |
<!-- Account, profile, or environment was not declared in
|
216 |
object Tealium(\$account, \$profile, \$target, \$pageType) -->
|
217 |
EOD;
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
return $renderedCode;
|
222 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
|
224 |
+
}
|
@@ -1,127 +1,134 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class TealiumExtendData
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
public function getCartPage() {
|
57 |
-
$store = TealiumExtendData::$store;
|
58 |
-
$page = TealiumExtendData::$page;
|
59 |
-
|
60 |
-
$outputArray = array();
|
61 |
-
//$outputArray['custom_key'] = "value";
|
62 |
-
// make sure any product values are in an array
|
63 |
-
|
64 |
-
return $outputArray;
|
65 |
-
}
|
66 |
-
|
67 |
-
public function getOrderConfirmation(){
|
68 |
-
$store = TealiumExtendData::$store;
|
69 |
-
$page = TealiumExtendData::$page;
|
70 |
-
|
71 |
-
$outputArray = array();
|
72 |
-
//$outputArray['custom_key'] = "value";
|
73 |
-
// make sure any product values are in an array
|
74 |
-
|
75 |
-
return $outputArray;
|
76 |
-
}
|
77 |
-
|
78 |
-
public function getCustomerData(){
|
79 |
-
$store = TealiumExtendData::$store;
|
80 |
-
$page = TealiumExtendData::$page;
|
81 |
-
|
82 |
-
$outputArray = array();
|
83 |
-
//$outputArray['custom_key'] = "value";
|
84 |
-
|
85 |
-
return $outputArray;
|
86 |
-
}
|
87 |
-
}
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
TealiumExtendData::setStore($data["store"]);
|
91 |
TealiumExtendData::setPage($data["page"]);
|
92 |
|
93 |
-
|
94 |
$udoElements = array(
|
95 |
-
'Home' => function(){
|
96 |
-
|
97 |
-
|
98 |
},
|
99 |
-
'Search' => function(){
|
100 |
-
|
101 |
-
|
102 |
},
|
103 |
-
'Category' => function(){
|
104 |
-
|
105 |
-
|
106 |
},
|
107 |
-
'ProductPage' => function(){
|
108 |
-
|
109 |
-
|
110 |
},
|
111 |
-
'Cart' => function(){
|
112 |
-
|
113 |
-
|
114 |
},
|
115 |
-
'Confirmation' => function(){
|
116 |
-
|
117 |
-
|
118 |
},
|
119 |
-
'Customer' => function(){
|
120 |
-
|
121 |
-
|
122 |
}
|
123 |
);
|
124 |
|
125 |
-
|
126 |
-
?>
|
127 |
-
|
1 |
<?php
|
2 |
|
3 |
+
class TealiumExtendData
|
4 |
+
{
|
5 |
+
|
6 |
+
private static $store;
|
7 |
+
private static $page;
|
8 |
+
|
9 |
+
public static function setStore($store)
|
10 |
+
{
|
11 |
+
TealiumExtendData::$store = $store;
|
12 |
+
}
|
13 |
+
|
14 |
+
public static function setPage($page)
|
15 |
+
{
|
16 |
+
TealiumExtendData::$page = $page;
|
17 |
+
}
|
18 |
+
|
19 |
+
public function getHome()
|
20 |
+
{
|
21 |
+
$store = TealiumExtendData::$store;
|
22 |
+
$page = TealiumExtendData::$page;
|
23 |
+
|
24 |
+
$outputArray = array();
|
25 |
+
//$outputArray['custom_key'] = "value";
|
26 |
+
|
27 |
+
return $outputArray;
|
28 |
+
}
|
29 |
+
|
30 |
+
public function getSearch()
|
31 |
+
{
|
32 |
+
$store = TealiumExtendData::$store;
|
33 |
+
$page = TealiumExtendData::$page;
|
34 |
+
|
35 |
+
$outputArray = array();
|
36 |
+
//$outputArray['custom_key'] = "value";
|
37 |
+
|
38 |
+
return $outputArray;
|
39 |
+
}
|
40 |
+
|
41 |
+
public function getCategory()
|
42 |
+
{
|
43 |
+
$store = TealiumExtendData::$store;
|
44 |
+
$page = TealiumExtendData::$page;
|
45 |
+
|
46 |
+
$outputArray = array();
|
47 |
+
//$outputArray['custom_key'] = "value";
|
48 |
+
|
49 |
+
return $outputArray;
|
50 |
+
}
|
51 |
+
|
52 |
+
public function getProductPage()
|
53 |
+
{
|
54 |
+
$store = TealiumExtendData::$store;
|
55 |
+
$page = TealiumExtendData::$page;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
+
$outputArray = array();
|
58 |
+
//$outputArray['custom_key'] = "value";
|
59 |
+
// make sure any product values are in an array
|
60 |
+
|
61 |
+
return $outputArray;
|
62 |
+
}
|
63 |
+
|
64 |
+
public function getCartPage()
|
65 |
+
{
|
66 |
+
$store = TealiumExtendData::$store;
|
67 |
+
$page = TealiumExtendData::$page;
|
68 |
+
|
69 |
+
$outputArray = array();
|
70 |
+
//$outputArray['custom_key'] = "value";
|
71 |
+
// make sure any product values are in an array
|
72 |
+
|
73 |
+
return $outputArray;
|
74 |
+
}
|
75 |
+
|
76 |
+
public function getOrderConfirmation()
|
77 |
+
{
|
78 |
+
$store = TealiumExtendData::$store;
|
79 |
+
$page = TealiumExtendData::$page;
|
80 |
+
|
81 |
+
$outputArray = array();
|
82 |
+
//$outputArray['custom_key'] = "value";
|
83 |
+
// make sure any product values are in an array
|
84 |
+
|
85 |
+
return $outputArray;
|
86 |
+
}
|
87 |
+
|
88 |
+
public function getCustomerData()
|
89 |
+
{
|
90 |
+
$store = TealiumExtendData::$store;
|
91 |
+
$page = TealiumExtendData::$page;
|
92 |
+
|
93 |
+
$outputArray = array();
|
94 |
+
//$outputArray['custom_key'] = "value";
|
95 |
+
|
96 |
+
return $outputArray;
|
97 |
+
}
|
98 |
+
|
99 |
+
}
|
100 |
|
101 |
TealiumExtendData::setStore($data["store"]);
|
102 |
TealiumExtendData::setPage($data["page"]);
|
103 |
|
|
|
104 |
$udoElements = array(
|
105 |
+
'Home' => function() {
|
106 |
+
$tealiumData = new TealiumExtendData();
|
107 |
+
return $tealiumData->getHome();
|
108 |
},
|
109 |
+
'Search' => function() {
|
110 |
+
$tealiumData = new TealiumExtendData();
|
111 |
+
return $tealiumData->getSearch();
|
112 |
},
|
113 |
+
'Category' => function() {
|
114 |
+
$tealiumData = new TealiumExtendData();
|
115 |
+
return $tealiumData->getCategory();
|
116 |
},
|
117 |
+
'ProductPage' => function() {
|
118 |
+
$tealiumData = new TealiumExtendData();
|
119 |
+
return $tealiumData->getProductPage();
|
120 |
},
|
121 |
+
'Cart' => function() {
|
122 |
+
$tealiumData = new TealiumExtendData();
|
123 |
+
return $tealiumData->getCartPage();
|
124 |
},
|
125 |
+
'Confirmation' => function() {
|
126 |
+
$tealiumData = new TealiumExtendData();
|
127 |
+
return $tealiumData->getOrderConfirmation();
|
128 |
},
|
129 |
+
'Customer' => function() {
|
130 |
+
$tealiumData = new TealiumExtendData();
|
131 |
+
return $tealiumData->getCustomerData();
|
132 |
}
|
133 |
);
|
134 |
|
|
|
|
|
|
@@ -1,325 +1,429 @@
|
|
1 |
<?php
|
|
|
2 |
// TealiumInit.php var definition file
|
3 |
-
//
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
$outputArray['product_sku'] = array();
|
105 |
-
}
|
106 |
-
if ( !($outputArray['product_name'] = array( $page->getProduct()->getName() )) ){
|
107 |
-
$outputArray['product_name'] = array();
|
108 |
-
}
|
109 |
-
if ( !($outputArray['product_brand'] = array( $page->getProduct()->getBrand() )) ){
|
110 |
-
$outputArray['product_brand'] = array();
|
111 |
-
}
|
112 |
-
if ( !($outputArray['product_unit_price'] = array( number_format($page->getProduct()->getSpecialPrice(), 2) )) ){
|
113 |
-
$outputArray['product_unit_price'] = array();
|
114 |
-
}
|
115 |
-
if ( !($outputArray['product_list_price'] = array( number_format($page->getProduct()->getPrice(), 2) )) ){
|
116 |
-
$outputArray['product_list_price'] = array();
|
117 |
-
}
|
118 |
-
}
|
119 |
-
else {
|
120 |
-
$outputArray['product_id'] = array();
|
121 |
-
$outputArray['product_sku'] = array();
|
122 |
-
$outputArray['product_name'] = array();
|
123 |
-
$outputArray['product_brand'] = array();
|
124 |
-
$outputArray['product_unit_price'] = array();
|
125 |
-
$outputArray['product_list_price'] = array();
|
126 |
-
}
|
127 |
-
|
128 |
-
$outputArray['product_price'] = $outputArray['product_unit_price'];
|
129 |
-
$outputArray['product_original_price'] = $outputArray['product_list_price'];
|
130 |
-
|
131 |
-
if ( Mage::registry('current_category') ){
|
132 |
-
if ( Mage::registry('current_category')->getName() ){
|
133 |
-
$outputArray['product_category'] = array(Mage::registry('current_category')->getName());
|
134 |
-
}
|
135 |
-
else {
|
136 |
-
$outputArray['product_category'] = array();
|
137 |
-
}
|
138 |
-
}
|
139 |
-
else {
|
140 |
-
$outputArray['product_category'] = array();
|
141 |
-
}
|
142 |
-
|
143 |
-
return $outputArray;
|
144 |
-
}
|
145 |
-
|
146 |
-
public function getCartPage() {
|
147 |
-
$store = TealiumData::$store;
|
148 |
-
$page = TealiumData::$page;
|
149 |
-
$checkout_ids = $checkout_skus = $checkout_names = $checkout_qtys = $checkout_prices = $checkout_original_prices = $checkout_brands = array();
|
150 |
-
|
151 |
-
if (Mage::helper('checkout')) {
|
152 |
-
$quote = Mage::helper('checkout')->getQuote();
|
153 |
-
foreach ($quote->getAllVisibleItems() as $item) {
|
154 |
-
$checkout_ids[] = $item->getProductId();
|
155 |
-
$checkout_skus[] = $item->getSku();
|
156 |
-
$checkout_names[] = $item->getName();
|
157 |
-
$checkout_qtys[] = number_format($item->getQty(), 0, ".", "");
|
158 |
-
$checkout_prices[] = number_format($item->getPrice(), 2, ".", "");
|
159 |
-
$checkout_original_prices[] = number_format($item->getProduct()->getPrice(), 2, ".", "");
|
160 |
-
$checkout_brands[] = $item->getProduct()->getBrand();
|
161 |
-
}
|
162 |
-
}
|
163 |
-
|
164 |
-
$outputArray = array();
|
165 |
-
$outputArray['site_region'] = Mage::app()->getLocale()->getLocaleCode() ?: "";
|
166 |
-
$outputArray['site_currency'] = $store->getCurrentCurrencyCode() ?: "";
|
167 |
-
$outputArray['page_name'] = $page->getLayout()->getBlock('head')->getTitle() ?: "";
|
168 |
-
$outputArray['page_type'] = "checkout";
|
169 |
-
|
170 |
-
// THE FOLLOWING NEEDS TO BE MATCHED ARRAYS (SAME NUMBER OF ELEMENTS)
|
171 |
-
$outputArray['product_id'] = $checkout_ids ?: array();
|
172 |
-
$outputArray['product_sku'] = $checkout_skus ?: array();
|
173 |
-
$outputArray['product_name'] = $checkout_names ?: array();
|
174 |
-
$outputArray['product_brand'] = $checkout_brands ?: array();
|
175 |
-
$outputArray['product_category'] = array();
|
176 |
-
$outputArray['product_quantity'] = $checkout_qtys ?: array();
|
177 |
-
$outputArray['product_unit_price'] = $checkout_prices ?: array();
|
178 |
-
$outputArray['product_list_price'] = $checkout_original_prices ?: array();
|
179 |
-
|
180 |
-
$outputArray['product_price'] = $outputArray['product_unit_price'];
|
181 |
-
$outputArray['product_original_price'] = $outputArray['product_list_price'];
|
182 |
-
|
183 |
-
return $outputArray;
|
184 |
-
}
|
185 |
-
|
186 |
-
public function getOrderConfirmation(){
|
187 |
-
$store = TealiumData::$store;
|
188 |
-
$page = TealiumData::$page;
|
189 |
-
|
190 |
-
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
191 |
-
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
192 |
-
$customer_id = $customer->getEntityId();
|
193 |
-
$customer_email = $customer->getEmail();
|
194 |
-
$groupId = $customer->getGroupId();
|
195 |
-
$customer_type = Mage::getModel('customer/group')->load($groupId)->getCode();
|
196 |
-
}
|
197 |
-
|
198 |
-
if (Mage::getModel('sales/order')) {
|
199 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($page->getOrderId());
|
200 |
-
foreach ($order->getAllVisibleItems() as $item) {
|
201 |
-
|
202 |
-
$ids[] = $item->getProductId();
|
203 |
-
$skus[] = $item->getSku();
|
204 |
-
$names[] = $item->getName();
|
205 |
-
$qtys[] = number_format($item->getQtyOrdered(), 0, ".", "");
|
206 |
-
$prices[] = number_format($item->getPrice(), 2, ".", "");
|
207 |
-
$original_prices[] = number_format($item->getProduct()->getPrice(), 2, ".", "");
|
208 |
-
$discount = number_format($item->getDiscountAmount(), 2, ".", "");
|
209 |
-
$discounts[] = $discount;
|
210 |
-
$applied_rules = explode(",", $item->getAppliedRuleIds());
|
211 |
-
$discount_object = array();
|
212 |
-
$brands[] = $item->getProduct()->getBrand();
|
213 |
-
foreach ($applied_rules as $rule) {
|
214 |
-
$quantity = number_format(Mage::getModel('salesrule/rule')->load($rule)->getDiscountQty(), 0, ".", "");
|
215 |
-
$amount = number_format(Mage::getModel('salesrule/rule')->load($rule)->getDiscountAmount(), 2, ".", "");
|
216 |
-
$type = Mage::getModel('salesrule/rule')->load($rule)->getSimpleAction();
|
217 |
-
$discount_object[] = array("rule" =>$rule,
|
218 |
-
"quantity" =>$quantity,
|
219 |
-
"amount" =>$amount,
|
220 |
-
"type" =>$type);
|
221 |
-
}
|
222 |
-
$discount_quantity[] = array("product_id" => $item->getProductId(),
|
223 |
-
"total_discount" => $discount,
|
224 |
-
"discounts" => $discount_object);
|
225 |
-
|
226 |
-
}
|
227 |
-
}
|
228 |
-
|
229 |
-
$outputArray = array();
|
230 |
-
|
231 |
-
$outputArray['site_region'] = Mage::app()->getLocale()->getLocaleCode() ?: "";
|
232 |
-
$outputArray['site_currency'] = $store->getCurrentCurrencyCode() ?: "";
|
233 |
-
$outputArray['page_name'] = "cart success";
|
234 |
-
$outputArray['page_type'] = "cart";
|
235 |
-
$outputArray['order_id'] = $order->getIncrementId() ?: "";
|
236 |
-
$outputArray['order_discount'] = number_format($order->getDiscountAmount(), 2, ".", "") ?: "";
|
237 |
-
$outputArray['order_subtotal'] = number_format($order->getSubtotal(), 2, ".", "") ?: "";
|
238 |
-
$outputArray['order_shipping'] = number_format($order->getShippingAmount(), 2, ".", "") ?: "";
|
239 |
-
$outputArray['order_tax'] = number_format($order->getTaxAmount(), 2, ".", "") ?: "";
|
240 |
-
$outputArray['order_payment_type'] = $order->getPayment() ? $order->getPayment()->getMethodInstance()->getTitle() : 'unknown';
|
241 |
-
$outputArray['order_total'] = number_format($order->getGrandTotal(), 2, ".", "") ?: "";
|
242 |
-
$outputArray['order_currency'] = $order->getOrderCurrencyCode() ?: "";
|
243 |
-
$outputArray['customer_id'] = $customer_id ?: "";
|
244 |
-
$outputArray['customer_email'] = $order->getCustomerEmail() ?: "";
|
245 |
-
$outputArray['product_id'] = $ids ?: array();
|
246 |
-
$outputArray['product_sku'] = $skus ?: array();
|
247 |
-
$outputArray['product_name'] = $names ?: array();
|
248 |
-
$outputArray['product_brand'] = $brands ?: array();
|
249 |
-
$outputArray['product_category'] = array();
|
250 |
-
$outputArray['product_unit_price'] = $prices ?: array();
|
251 |
-
$outputArray['product_list_price'] = $original_prices ?: array();
|
252 |
-
$outputArray['product_price'] = $outputArray['product_unit_price'];
|
253 |
-
$outputArray['product_original_price'] = $outputArray['product_list_price'];
|
254 |
-
$outputArray['product_quantity'] = $qtys ?: array();
|
255 |
-
$outputArray['product_discount'] = $discounts ?: array();
|
256 |
-
$outputArray['product_discounts'] = $discount_quantity ?: array();
|
257 |
-
|
258 |
-
return $outputArray;
|
259 |
-
}
|
260 |
-
|
261 |
-
public function getCustomerData(){
|
262 |
-
$store = TealiumData::$store;
|
263 |
-
$page = TealiumData::$page;
|
264 |
-
|
265 |
-
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
266 |
-
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
267 |
-
$customer_id = $customer->getEntityId();
|
268 |
-
$customer_email = $customer->getEmail();
|
269 |
-
$groupId = $customer->getGroupId();
|
270 |
-
$customer_type = Mage::getModel('customer/group')->load($groupId)->getCode();
|
271 |
-
}
|
272 |
-
|
273 |
-
$outputArray = array();
|
274 |
-
|
275 |
-
$outputArray['site_region'] = Mage::app()->getLocale()->getLocaleCode() ?: "";
|
276 |
-
$outputArray['site_currency'] = $store->getCurrentCurrencyCode() ?: "";
|
277 |
-
$outputArray['page_name'] = $page->getLayout()->getBlock('head')->getTitle() ?: "";
|
278 |
-
$outputArray['page_type'] = $page->getTealiumType() ?: "";
|
279 |
-
$outputArray['customer_id'] = $customer_id ?: "";
|
280 |
-
$outputArray['customer_email'] = $customer_email ?: "";
|
281 |
-
$outputArray['customer_type'] = $customer_type ?: "";
|
282 |
-
|
283 |
-
return $outputArray;
|
284 |
-
}
|
285 |
-
}
|
286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
TealiumData::setStore($data["store"]);
|
289 |
TealiumData::setPage($data["page"]);
|
290 |
|
291 |
-
|
292 |
$udoElements = array(
|
293 |
-
'Home' => function(){
|
294 |
-
|
295 |
-
|
296 |
},
|
297 |
-
'Search' => function(){
|
298 |
-
|
299 |
-
|
300 |
},
|
301 |
-
'Category' => function(){
|
302 |
-
|
303 |
-
|
304 |
},
|
305 |
-
'ProductPage' => function(){
|
306 |
-
|
307 |
-
|
308 |
},
|
309 |
-
'Cart' => function(){
|
310 |
-
|
311 |
-
|
312 |
},
|
313 |
-
'Confirmation' => function(){
|
314 |
-
|
315 |
-
|
316 |
},
|
317 |
-
'Customer' => function(){
|
318 |
-
|
319 |
-
|
320 |
}
|
321 |
);
|
322 |
-
|
323 |
-
|
324 |
-
?>
|
325 |
-
|
1 |
<?php
|
2 |
+
|
3 |
// TealiumInit.php var definition file
|
4 |
+
//
|
5 |
+
// Replace $STRING or $ARRAY with your server
|
6 |
+
// side variable reference unique to that key
|
7 |
+
|
8 |
+
class TealiumData
|
9 |
+
{
|
10 |
+
// Declare store and page as static vars and define setter methods
|
11 |
+
private static $store;
|
12 |
+
private static $page;
|
13 |
+
|
14 |
+
public static function setStore($store)
|
15 |
+
{
|
16 |
+
TealiumData::$store = $store;
|
17 |
+
}
|
18 |
+
|
19 |
+
public static function setPage($page)
|
20 |
+
{
|
21 |
+
TealiumData::$page = $page;
|
22 |
+
}
|
23 |
+
|
24 |
+
// Define methods for getting udo to output for each page type
|
25 |
+
public function getHome()
|
26 |
+
{
|
27 |
+
$store = TealiumData::$store;
|
28 |
+
$page = TealiumData::$page;
|
29 |
+
|
30 |
+
$outputArray = array();
|
31 |
+
$outputArray['site_region'] =
|
32 |
+
Mage::app()->getLocale()->getLocaleCode() ? : "";
|
33 |
+
$outputArray['site_currency'] = $store->getCurrentCurrencyCode() ? : "";
|
34 |
+
$outputArray['page_name'] =
|
35 |
+
$page->getLayout()->getBlock('head')->getTitle() ? : "";
|
36 |
+
$outputArray['page_type'] = $page->getTealiumType() ? : "";
|
37 |
+
|
38 |
+
return $outputArray;
|
39 |
+
}
|
40 |
+
|
41 |
+
public function getSearch()
|
42 |
+
{
|
43 |
+
$store = TealiumData::$store;
|
44 |
+
$page = TealiumData::$page;
|
45 |
+
|
46 |
+
$outputArray = array();
|
47 |
+
$outputArray['site_region'] =
|
48 |
+
Mage::app()->getLocale()->getLocaleCode() ? : "";
|
49 |
+
$outputArray['site_currency'] = $store->getCurrentCurrencyCode() ? : "";
|
50 |
+
$outputArray['page_name'] = "search results";
|
51 |
+
$outputArray['page_type'] = "search";
|
52 |
+
$outputArray['search_results'] = $page->getResultCount() . "" ? : "";
|
53 |
+
$outputArray['search_keyword'] =
|
54 |
+
$page->helper('catalogsearch')->getEscapedQueryText() ? : "";
|
55 |
+
|
56 |
+
return $outputArray;
|
57 |
+
}
|
58 |
+
|
59 |
+
public function getCategory()
|
60 |
+
{
|
61 |
+
$store = TealiumData::$store;
|
62 |
+
$page = TealiumData::$page;
|
63 |
+
|
64 |
+
if ($page->getCurrentCategory()) {
|
65 |
+
$_category = $page->getCurrentCategory();
|
66 |
+
$parent = false;
|
67 |
+
$grandparent = false;
|
68 |
+
|
69 |
+
// check for parent and grandparent
|
70 |
+
if ($_category->getParentId()) {
|
71 |
+
$parent =
|
72 |
+
Mage::getModel('catalog/category')
|
73 |
+
->load($_category->getParentId());
|
74 |
+
|
75 |
+
if ($parent->getParentId()) {
|
76 |
+
$grandparent =
|
77 |
+
Mage::getModel('catalog/category')
|
78 |
+
->load($parent->getParentId());
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
// Set the section and subcategory with parent and grandparent
|
83 |
+
if ($grandparent) {
|
84 |
+
$section = $grandparent->getName();
|
85 |
+
$category = $parent->getName();
|
86 |
+
$subcategory = $_category->getName();
|
87 |
+
} elseif ($parent) {
|
88 |
+
$section = $parent->getName();
|
89 |
+
$category = $_category->getName();
|
90 |
+
} else {
|
91 |
+
$category = $_category->getName();
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
$outputArray = array();
|
96 |
+
$outputArray['site_region'] =
|
97 |
+
Mage::app()->getLocale()->getLocaleCode() ? : "";
|
98 |
+
$outputArray['site_currency'] = $store->getCurrentCurrencyCode() ? : "";
|
99 |
+
$outputArray['page_name'] =
|
100 |
+
$_category ? ($_category->getName() ? : "") : "";
|
101 |
+
$outputArray['page_type'] = "category";
|
102 |
+
$outputArray['page_section_name'] = $section ? : "";
|
103 |
+
$outputArray['page_category_name'] = $category ? : "";
|
104 |
+
$outputArray['page_subcategory_name'] = $subcategory ? : "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
+
return $outputArray;
|
107 |
+
}
|
108 |
+
|
109 |
+
public function getProductPage()
|
110 |
+
{
|
111 |
+
$store = TealiumData::$store;
|
112 |
+
$page = TealiumData::$page;
|
113 |
+
|
114 |
+
$outputArray = array();
|
115 |
+
$outputArray['site_region'] =
|
116 |
+
Mage::app()->getLocale()->getLocaleCode() ? : "";
|
117 |
+
$outputArray['site_currency'] = $store->getCurrentCurrencyCode() ? : "";
|
118 |
+
$outputArray['page_name'] =
|
119 |
+
$page->getProduct() ? ($page->getProduct()->getName() ? : "") : "";
|
120 |
+
$outputArray['page_type'] = "product";
|
121 |
+
|
122 |
+
// THE FOLLOWING NEEDS TO BE MATCHED ARRAYS (SAME NUMBER OF ELEMENTS)
|
123 |
+
if ($page->getProduct()) {
|
124 |
+
if (!(
|
125 |
+
$outputArray['product_id'] = array($page->getProduct()->getId())
|
126 |
+
)) {
|
127 |
+
$outputArray['product_id'] = array();
|
128 |
+
}
|
129 |
+
|
130 |
+
if (!(
|
131 |
+
$outputArray['product_sku'] = array(
|
132 |
+
$page->getProduct()->getSku()
|
133 |
+
)
|
134 |
+
)) {
|
135 |
+
$outputArray['product_sku'] = array();
|
136 |
+
}
|
137 |
+
|
138 |
+
if (!(
|
139 |
+
$outputArray['product_name'] = array(
|
140 |
+
$page->getProduct()->getName()
|
141 |
+
)
|
142 |
+
)) {
|
143 |
+
$outputArray['product_name'] = array();
|
144 |
+
}
|
145 |
+
|
146 |
+
if (!(
|
147 |
+
$outputArray['product_brand'] = array(
|
148 |
+
$page->getProduct()->getBrand()
|
149 |
+
)
|
150 |
+
)) {
|
151 |
+
$outputArray['product_brand'] = array();
|
152 |
+
}
|
153 |
+
|
154 |
+
if (!(
|
155 |
+
$outputArray['product_unit_price'] = array(
|
156 |
+
number_format($page->getProduct()->getSpecialPrice(), 2)
|
157 |
+
)
|
158 |
+
)) {
|
159 |
+
$outputArray['product_unit_price'] = array();
|
160 |
+
}
|
161 |
+
|
162 |
+
if (!(
|
163 |
+
$outputArray['product_list_price'] = array(
|
164 |
+
number_format($page->getProduct()->getPrice(), 2)
|
165 |
+
)
|
166 |
+
)) {
|
167 |
+
$outputArray['product_list_price'] = array();
|
168 |
+
}
|
169 |
+
} else {
|
170 |
+
$outputArray['product_id'] = array();
|
171 |
+
$outputArray['product_sku'] = array();
|
172 |
+
$outputArray['product_name'] = array();
|
173 |
+
$outputArray['product_brand'] = array();
|
174 |
+
$outputArray['product_unit_price'] = array();
|
175 |
+
$outputArray['product_list_price'] = array();
|
176 |
+
}
|
177 |
|
178 |
+
$outputArray['product_price'] = $outputArray['product_unit_price'];
|
179 |
+
$outputArray['product_original_price'] =
|
180 |
+
$outputArray['product_list_price'];
|
181 |
+
|
182 |
+
if (Mage::registry('current_category')) {
|
183 |
+
if (Mage::registry('current_category')->getName()) {
|
184 |
+
$outputArray['product_category'] = array(
|
185 |
+
Mage::registry('current_category')->getName()
|
186 |
+
);
|
187 |
+
} else {
|
188 |
+
$outputArray['product_category'] = array();
|
189 |
+
}
|
190 |
+
} else {
|
191 |
+
$outputArray['product_category'] = array();
|
192 |
+
}
|
193 |
+
|
194 |
+
return $outputArray;
|
195 |
+
}
|
196 |
+
|
197 |
+
public function getCartPage()
|
198 |
+
{
|
199 |
+
$store = TealiumData::$store;
|
200 |
+
$page = TealiumData::$page;
|
201 |
+
|
202 |
+
$checkout_ids =
|
203 |
+
$checkout_skus =
|
204 |
+
$checkout_names =
|
205 |
+
$checkout_qtys =
|
206 |
+
$checkout_prices =
|
207 |
+
$checkout_original_prices =
|
208 |
+
$checkout_brands =
|
209 |
+
array();
|
210 |
+
|
211 |
+
if (Mage::helper('checkout')) {
|
212 |
+
$quote = Mage::helper('checkout')->getQuote();
|
213 |
+
foreach ($quote->getAllVisibleItems() as $item) {
|
214 |
+
$checkout_ids[] = $item->getProductId();
|
215 |
+
$checkout_skus[] = $item->getSku();
|
216 |
+
$checkout_names[] = $item->getName();
|
217 |
+
$checkout_qtys[] = number_format($item->getQty(), 0, ".", "");
|
218 |
+
$checkout_prices[] =
|
219 |
+
number_format($item->getPrice(), 2, ".", "");
|
220 |
+
$checkout_original_prices[] =
|
221 |
+
number_format($item->getProduct()->getPrice(), 2, ".", "");
|
222 |
+
$checkout_brands[] = $item->getProduct()->getBrand();
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
$outputArray = array();
|
227 |
+
$outputArray['site_region'] =
|
228 |
+
Mage::app()->getLocale()->getLocaleCode() ? : "";
|
229 |
+
$outputArray['site_currency'] = $store->getCurrentCurrencyCode() ? : "";
|
230 |
+
$outputArray['page_name'] =
|
231 |
+
$page->getLayout()->getBlock('head')->getTitle() ? : "";
|
232 |
+
$outputArray['page_type'] = "checkout";
|
233 |
+
|
234 |
+
// THE FOLLOWING NEEDS TO BE MATCHED ARRAYS (SAME NUMBER OF ELEMENTS)
|
235 |
+
$outputArray['product_id'] = $checkout_ids ? : array();
|
236 |
+
$outputArray['product_sku'] = $checkout_skus ? : array();
|
237 |
+
$outputArray['product_name'] = $checkout_names ? : array();
|
238 |
+
$outputArray['product_brand'] = $checkout_brands ? : array();
|
239 |
+
$outputArray['product_category'] = array();
|
240 |
+
$outputArray['product_quantity'] = $checkout_qtys ? : array();
|
241 |
+
$outputArray['product_unit_price'] = $checkout_prices ? : array();
|
242 |
+
$outputArray['product_list_price'] =
|
243 |
+
$checkout_original_prices ? : array();
|
244 |
+
|
245 |
+
$outputArray['product_price'] = $outputArray['product_unit_price'];
|
246 |
+
$outputArray['product_original_price'] =
|
247 |
+
$outputArray['product_list_price'];
|
248 |
+
|
249 |
+
return $outputArray;
|
250 |
+
}
|
251 |
+
|
252 |
+
public function getOrderConfirmation()
|
253 |
+
{
|
254 |
+
$store = TealiumData::$store;
|
255 |
+
$page = TealiumData::$page;
|
256 |
+
|
257 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
258 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
259 |
+
$customer_id = $customer->getEntityId();
|
260 |
+
$customer_email = $customer->getEmail();
|
261 |
+
$groupId = $customer->getGroupId();
|
262 |
+
$customer_type =
|
263 |
+
Mage::getModel('customer/group')->load($groupId)->getCode();
|
264 |
+
}
|
265 |
+
|
266 |
+
if (Mage::getModel('sales/order')) {
|
267 |
+
$order = Mage::getModel('sales/order')
|
268 |
+
->loadByIncrementId($page->getOrderId());
|
269 |
+
|
270 |
+
foreach ($order->getAllVisibleItems() as $item) {
|
271 |
+
$ids[] = $item->getProductId();
|
272 |
+
$skus[] = $item->getSku();
|
273 |
+
$names[] = $item->getName();
|
274 |
+
$qtys[] = number_format($item->getQtyOrdered(), 0, ".", "");
|
275 |
+
$prices[] = number_format($item->getPrice(), 2, ".", "");
|
276 |
+
$original_prices[] =
|
277 |
+
number_format($item->getProduct()->getPrice(), 2, ".", "");
|
278 |
+
$discount =
|
279 |
+
number_format($item->getDiscountAmount(), 2, ".", "");
|
280 |
+
$discounts[] = $discount;
|
281 |
+
$applied_rules = explode(",", $item->getAppliedRuleIds());
|
282 |
+
$discount_object = array();
|
283 |
+
$brands[] = $item->getProduct()->getBrand();
|
284 |
+
foreach ($applied_rules as $rule) {
|
285 |
+
$quantity = number_format(
|
286 |
+
Mage::getModel('salesrule/rule')
|
287 |
+
->load($rule)
|
288 |
+
->getDiscountQty(),
|
289 |
+
0,
|
290 |
+
".",
|
291 |
+
""
|
292 |
+
);
|
293 |
+
|
294 |
+
$amount = number_format(
|
295 |
+
Mage::getModel('salesrule/rule')
|
296 |
+
->load($rule)
|
297 |
+
->getDiscountAmount(),
|
298 |
+
2,
|
299 |
+
".",
|
300 |
+
""
|
301 |
+
);
|
302 |
+
|
303 |
+
$type = Mage::getModel('salesrule/rule')
|
304 |
+
->load($rule)
|
305 |
+
->getSimpleAction();
|
306 |
+
|
307 |
+
$discount_object[] = array(
|
308 |
+
"rule" => $rule,
|
309 |
+
"quantity" => $quantity,
|
310 |
+
"amount" => $amount,
|
311 |
+
"type" => $type
|
312 |
+
);
|
313 |
+
}
|
314 |
+
$discount_quantity[] = array(
|
315 |
+
"product_id" => $item->getProductId(),
|
316 |
+
"total_discount" => $discount,
|
317 |
+
"discounts" => $discount_object
|
318 |
+
);
|
319 |
+
}
|
320 |
+
}
|
321 |
+
|
322 |
+
$outputArray = array();
|
323 |
+
|
324 |
+
$outputArray['site_region'] =
|
325 |
+
Mage::app()->getLocale()->getLocaleCode() ? : "";
|
326 |
+
$outputArray['site_currency'] = $store->getCurrentCurrencyCode() ? : "";
|
327 |
+
$outputArray['page_name'] = "cart success";
|
328 |
+
$outputArray['page_type'] = "cart";
|
329 |
+
$outputArray['order_id'] = $order->getIncrementId() ? : "";
|
330 |
+
$outputArray['order_discount'] =
|
331 |
+
number_format($order->getDiscountAmount(), 2, ".", "") ? : "";
|
332 |
+
$outputArray['order_subtotal'] =
|
333 |
+
number_format($order->getSubtotal(), 2, ".", "") ? : "";
|
334 |
+
$outputArray['order_shipping'] =
|
335 |
+
number_format($order->getShippingAmount(), 2, ".", "") ? : "";
|
336 |
+
$outputArray['order_tax'] =
|
337 |
+
number_format($order->getTaxAmount(), 2, ".", "") ? : "";
|
338 |
+
$outputArray['order_payment_type'] =
|
339 |
+
$order->getPayment()
|
340 |
+
? $order->getPayment()->getMethodInstance()->getTitle()
|
341 |
+
: 'unknown';
|
342 |
+
$outputArray['order_total'] =
|
343 |
+
number_format($order->getGrandTotal(), 2, ".", "") ? : "";
|
344 |
+
$outputArray['order_currency'] = $order->getOrderCurrencyCode() ? : "";
|
345 |
+
$outputArray['customer_id'] = $customer_id ? : "";
|
346 |
+
$outputArray['customer_email'] = $order->getCustomerEmail() ? : "";
|
347 |
+
$outputArray['product_id'] = $ids ? : array();
|
348 |
+
$outputArray['product_sku'] = $skus ? : array();
|
349 |
+
$outputArray['product_name'] = $names ? : array();
|
350 |
+
$outputArray['product_brand'] = $brands ? : array();
|
351 |
+
$outputArray['product_category'] = array();
|
352 |
+
$outputArray['product_unit_price'] = $prices ? : array();
|
353 |
+
$outputArray['product_list_price'] = $original_prices ? : array();
|
354 |
+
$outputArray['product_price'] = $outputArray['product_unit_price'];
|
355 |
+
$outputArray['product_original_price'] =
|
356 |
+
$outputArray['product_list_price'];
|
357 |
+
$outputArray['product_quantity'] = $qtys ? : array();
|
358 |
+
$outputArray['product_discount'] = $discounts ? : array();
|
359 |
+
$outputArray['product_discounts'] = $discount_quantity ? : array();
|
360 |
+
|
361 |
+
return $outputArray;
|
362 |
+
}
|
363 |
+
|
364 |
+
public function getCustomerData()
|
365 |
+
{
|
366 |
+
$store = TealiumData::$store;
|
367 |
+
$page = TealiumData::$page;
|
368 |
+
|
369 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
370 |
+
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
371 |
+
$customer_id = $customer->getEntityId();
|
372 |
+
$customer_email = $customer->getEmail();
|
373 |
+
$groupId = $customer->getGroupId();
|
374 |
+
$customer_type =
|
375 |
+
Mage::getModel('customer/group')->load($groupId)->getCode();
|
376 |
+
}
|
377 |
+
|
378 |
+
$outputArray = array();
|
379 |
+
|
380 |
+
$outputArray['site_region'] =
|
381 |
+
Mage::app()->getLocale()->getLocaleCode() ? : "";
|
382 |
+
$outputArray['site_currency'] = $store->getCurrentCurrencyCode() ? : "";
|
383 |
+
$outputArray['page_name'] =
|
384 |
+
$page->getLayout()->getBlock('head')->getTitle() ? : "";
|
385 |
+
$outputArray['page_type'] = $page->getTealiumType() ? : "";
|
386 |
+
$outputArray['customer_id'] = $customer_id ? : "";
|
387 |
+
$outputArray['customer_email'] = $customer_email ? : "";
|
388 |
+
$outputArray['customer_type'] = $customer_type ? : "";
|
389 |
+
|
390 |
+
return $outputArray;
|
391 |
+
}
|
392 |
+
|
393 |
+
}
|
394 |
+
|
395 |
+
// Initialize static vars and create object for getting udos for different
|
396 |
+
// page types
|
397 |
TealiumData::setStore($data["store"]);
|
398 |
TealiumData::setPage($data["page"]);
|
399 |
|
|
|
400 |
$udoElements = array(
|
401 |
+
'Home' => function() {
|
402 |
+
$tealiumData = new TealiumData();
|
403 |
+
return $tealiumData->getHome();
|
404 |
},
|
405 |
+
'Search' => function() {
|
406 |
+
$tealiumData = new TealiumData();
|
407 |
+
return $tealiumData->getSearch();
|
408 |
},
|
409 |
+
'Category' => function() {
|
410 |
+
$tealiumData = new TealiumData();
|
411 |
+
return $tealiumData->getCategory();
|
412 |
},
|
413 |
+
'ProductPage' => function() {
|
414 |
+
$tealiumData = new TealiumData();
|
415 |
+
return $tealiumData->getProductPage();
|
416 |
},
|
417 |
+
'Cart' => function() {
|
418 |
+
$tealiumData = new TealiumData();
|
419 |
+
return $tealiumData->getCartPage();
|
420 |
},
|
421 |
+
'Confirmation' => function() {
|
422 |
+
$tealiumData = new TealiumData();
|
423 |
+
return $tealiumData->getOrderConfirmation();
|
424 |
},
|
425 |
+
'Customer' => function() {
|
426 |
+
$tealiumData = new TealiumData();
|
427 |
+
return $tealiumData->getCustomerData();
|
428 |
}
|
429 |
);
|
|
|
|
|
|
|
|
@@ -1,40 +1,84 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Tealium_Tags</name>
|
4 |
-
<version>2.0.
|
5 |
<stability>stable</stability>
|
6 |
-
<license
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>
|
11 |
-
<notes>2.0.
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
2.0.
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
0.
|
26 |
-
|
27 |
-
|
28 |
-
0.
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
<compatible/>
|
39 |
-
<dependencies><required><php><min>5.
|
40 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Tealium_Tags</name>
|
4 |
+
<version>2.0.6</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license>Tealium License Agreement</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Tealium’s tag management makes it easy for marketers to deploy and manage their third-party vendor tags</summary>
|
10 |
+
<description>Tealium is the leader in enterprise tag management, serving some of the most demanding customers in the world. Tealium’s web-based services make it easy for digital marketers to deploy and manage their third-party vendor tags, and then correlate the data those tags generate into an actionable source. Using Tealium, organizations can streamline their digital marketing operations, improve web site performance, cut costs, and power their big data initiatives. The company differentiates itself through ease of use, scale and performance, and fanatical customer support. Select clients include Petco, A+E Networks, Fox Networks Group, Urban Outfitters, and many more! More than ever, today’s marketers are turning to digital solutions to improve efficiency and results. Tags – commonly known as tracking pixels – are becoming the data collection mechanism of choice, leaving marketers reliant on them to gather the right data about visitor activity and take action to improve their experience. But the process of deploying and managing vendor tags can be a nightmare for marketers, due to the technical nature associated with tagging, heavy costs, impact on site performance, and the dependence of IT resources to make changes. Tealium puts digital marketers in control of their online solutions, making it easy to add, edit, or remove any vendor without requesting assistance from IT. In addition, Tealium provides a rich source of all of an organization’s digital data to help marketers improve the effectiveness of their customer acquisition campaigns.</description>
|
11 |
+
<notes>2.0.6
|
12 |
+
UDO will now be pretty printed for readability
|
13 |
+
Added comments to code to improve long term maintainability
|
14 |
+

|
15 |
+
2.0.4
|
16 |
+
fixed one page checkout
|
17 |
+

|
18 |
+
2.0.3
|
19 |
+
Fixed warnings for REQUEST isset()
|
20 |
+
re-added page_type and page_name for order confirmation
|
21 |
+

|
22 |
+
2.0.2
|
23 |
+
Fix typos
|
24 |
+

|
25 |
+
2.0.1
|
26 |
+
Fix for extended UDO rendering blank page
|
27 |
+

|
28 |
+
2.0.0
|
29 |
+
Added external script support and refactored
|
30 |
+

|
31 |
+
1.2.0
|
32 |
+
Added UI admin toggle for onePage Checkout
|
33 |
+

|
34 |
+
1.1.1
|
35 |
+
Fixed pages not rendering
|
36 |
+

|
37 |
+
1.1.0
|
38 |
+
Added support for alternate checkout pages
|
39 |
+

|
40 |
+
1.0.2
|
41 |
+
Added html/text help to admin config
|
42 |
+

|
43 |
+
1.0.1
|
44 |
+
Fixed arrays that were rendering as strings
|
45 |
+

|
46 |
+
1.0.0
|
47 |
+
refactored based on Tealium class
|
48 |
+
added support for external UDO definition
|
49 |
+
added support for diagnostic pixel
|
50 |
+

|
51 |
+
0.4.4d
|
52 |
+
added output of diagnostic pixel
|
53 |
+

|
54 |
+
0.4.4
|
55 |
+
strip commas from all dollar values
|
56 |
+

|
57 |
+
0.4.3
|
58 |
+
fix for bad array on order page
|
59 |
+

|
60 |
+
0.4.2
|
61 |
+
added simple discount array
|
62 |
+

|
63 |
+
0.4.0
|
64 |
+
fix for individual discounts and number formats
|
65 |
+

|
66 |
+
0.3.1
|
67 |
+
fix for configurable product arrays
|
68 |
+

|
69 |
+
0.3.0
|
70 |
+
fix for missing support message
|
71 |
+

|
72 |
+
0.2.0
|
73 |
+
fix for product page tag syntax
|
74 |
+

|
75 |
+
0.1.0
|
76 |
+
initial release
|
77 |
+
</notes>
|
78 |
+
<authors><author><name>Tealium Inc.</name><user>tealium</user><email>tech-partners@tealium.com</email></author></authors>
|
79 |
+
<date>2016-06-17</date>
|
80 |
+
<time>20:58:24</time>
|
81 |
+
<contents><target name="magelocal"><dir name="Tealium"><dir name="Tags"><dir name="Helper"><file name="Data.php" hash="8665c2092e8fb27f81454396d3498496"/><file name="Observer.php" hash="4f8f5d2bd6ddf3ae2fd523408dcc38cf"/></dir><dir name="etc"><file name="LICENSE.txt" hash="46a50aab74d5f34fc9ef3cf2c63a4549"/><file name="adminhtml.xml" hash="209d26d3a4a661e0f8d0c48382475f3b"/><file name="config.xml" hash="b500eace2e25032f2bea3920ce029f9a"/><file name="system.xml" hash="5a13918f5c70bba9293bbc11e126d03f"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Tealium_Tags.xml" hash="2d9d09880fb7ccec2f41e052dcda4ad6"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="tealium_tags.xml" hash="aaa66b4bf775bbeb172eae1e84688491"/></dir><dir name="template"><dir name="tealium_tags"><file name="base.phtml" hash="35a83f64123aeae0dadba20482d3e5a3"/><file name="catalog_product_compare_index.phtml" hash="bd1255dfd1f04a2b9ec94e067606afe1"/><file name="catalogsearch_advanced_result_index.phtml" hash="61abd781b266f1e5fc25f4536fa54deb"/><file name="catalogsearch_result_index.phtml" hash="06f6f542261198fbddb25404af6b6b4d"/><file name="catalogsearch_term_popular.phtml" hash="8b97d638be4bab2d1f5e8f2cdf2600df"/><file name="category.phtml" hash="6f15ceb5ff693cdb647f1e9e796a25b7"/><file name="checkout_cart_index.phtml" hash="a4338bd66b9759dfd94e2d86a62f19b7"/><file name="checkout_onepage.phtml" hash="5816f552aacd6ae49e33334706eb8c41"/><file name="checkout_success.phtml" hash="7c29182bce05042ad5b2732144cfd493"/><file name="cms.phtml" hash="a2a8b08e9cd68c9d34f44510aef8ac8c"/><file name="customer.phtml" hash="355fc74b16dec9cf73e04b956a1dc476"/><file name="generic.phtml" hash="6c343aa7e5811828c74bfead157a1019"/><file name="guest_sales.phtml" hash="55b04109cdc11d9ae00375440af03568"/><file name="product.phtml" hash="2a4ca7ca1a571881f54812a1ded23ead"/><file name="product_send.phtml" hash="63beef471c5f9698755a7ef714940609"/><file name="seo.phtml" hash="a2a8b08e9cd68c9d34f44510aef8ac8c"/><file name="tag_list_index.phtml" hash="cad309bd6de5ca342e58a44dadf75134"/><file name="tag_product_list.phtml" hash="4672fbf5d57a3c4b31b9f84dc8ac547e"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="Tealium"><file name="Tealium.php" hash="0ab8e096f7333c74fa98566d943b96e0"/><file name="TealiumCustomData.php" hash="94d978966cc76c7cb34651caa23432f5"/><file name="TealiumInit.php" hash="eec23caddb42e215a61ca4b404242575"/></dir></target></contents>
|
82 |
<compatible/>
|
83 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
84 |
</package>
|