1"use strict"; 2/** 3 * Attribute Name Description Sample Value 4 * accountType 5 * This parameter should contain the method that the user used when they 6 * created their account on the website. Actual values can vary from website to 7 * website Social_Facebook, Social_Google+, Email, etc. gigyaID This parameter 8 * should contain the Gigya User ID assigned to a user, when a user is 9 * registered for an account on the site/app and logged-in. Auto-created by the 10 * Gigya system. ID8888, ID123657, etc. login-completed The value for this 11 * parameter should always be â1â in order to indicate that a user login was 12 * completed. This format of this number should be a number, not a string. 13 * 1 14 * 15 * login-completed:email 16 * The value for this parameter should always be â1â in order to indicate that 17 * a user login was completed using the âemailâ method. This format of this 18 * number should be a number, not a string. 19 * 1 20 * 21 * login-completed:social 22 * The value for this parameter should always be â1â in order to 23 * 1 24 * 25 * Nestlé 26 * 28 27 * Nestléâs Standard dataLayer Guidelines 28 * indicate that a user login was completed using the âsocialâ method. This 29 * format of this number should be a number, not a string. login-error The 30 * value for this parameter should always be â1â in order to indicate that a 31 * user encountered an error when attempting to login. This format of this 32 * number should be a number, not a string. 33 * 1 34 * 35 * login-started 36 * The value for this parameter should always be â1â in order to indicate that 37 * a user started the login process. This format of this number should be a 38 * number, not a string. 39 * 1 40 * 41 * login-started:email 42 * The value for this parameter should always be â1â in order to indicate that 43 * a user started the login process using the âemailâ method. This format of 44 * this number should be a number, not a string. 45 * 1 46 * 47 * login-started:social 48 * The value for this parameter should always be â1â in order to indicate that 49 * a user started the login process using the âsocialâ method. This format of 50 * this number should be a number, not a string. 51 * 1 52 * 53 * loginStatus 54 * This parameter should note whether the user is logged in or not. 55 * False, True 56 * 57 * loginType 58 * This parameter should contain the high-level method that the user used to 59 * login. email or social registrationError The value for this parameter should 60 * always be â1â in order to indicate that a user encountered an error when 61 * attempting to register. This format of this number should be a number, not a 62 * string. 63 * 1 64 * 65 * registrationError:email 66 * The value for this parameter should always be â1â in order to indicate that 67 * a user encountered an error when attempting to register using the âemailâ 68 * method. This format of this number should be a number, not a string. 69 * 1 70 * 71 * registrationError:social 72 * The value for this parameter should always be â1â in order to indicate that 73 * a user encountered an error when attempting to register using the âsocialâ 74 * method. This format of this number should be a number, not a string. 75 * 1 76 * 77 * registrationStarted 78 * The value for this parameter should always be â1â in order to indicate that 79 * a user started the registration process. This format of this number should 80 * be a number, not a string. 81 * 1 82 * 83 * registrationStarted:email 84 * The value for this parameter should always be â1â in order to indicate that 85 * a user started the registration process using the âemailâ method. This 86 * format of this number should be a number, not a string. 87 * 1 88 * 89 * registrationStarted:social 90 * The value for this parameter should always be â1â in order to indicate that 91 * a user started the registration process using the âsocialâ method. This 92 * format of this number should be a number, not a string. 93 * 1 94 * 95 * registrationSubmitted 96 * The value for this parameter should always be â1â in order to indicate that 97 * a user registration was completed. This format of this number should be a 98 * number, not a string. 99 * 1 100 * 101 * registrationSubmitted:email 102 * The value for this parameter should always be â1â in order to indicate that 103 * a user registration was completed using the âemailâ method. This format of 104 * this number should be a number, not a string. 105 * 1 106 * 107 * registrationSubmitted:social 108 * The value for this parameter should always be â1â in order to indicate that 109 * a user registration was completed using the âsocialâ method. This format of 110 * this number should be a number, not a string. 111 * 1 112 * 113 * registrationType 114 * This parameter should contain the type of registration method that the user 115 * used when they initially registered for the website. social login, email, 116 * Facebook, twitter, Instagram, google, etc. socialMedia This parameter should 117 * indicate the type of social media platform that the user used to register or 118 * log-in, if they used the "social" type to register or log-in. facebook, 119 * twitter, instagram, linkedin, etc. 120 * 121 * userType 122 * This parameter should contain user type. Actual values can vary from website 123 * to website. loyalty program tier 1, 2, 3 (gold, premium, guest..etc) 124 * */ 125(function () { 126 window.dataLayer = window.dataLayer || { 127 'push': function () { 128 } 129 }; 130 131 /** 132 * User Email Registration - Completed Step X 133 * 134 * This information should âpushâ into the dataLayer whenever a user 135 * completes a step in the âUser Registrationâ process on the site using the 136 * âemailâ registration type. This information should NOT âpushâ into the 137 * dataLayer when a user completes the registration process - that should be 138 * handled by the next event in this guide.*/ 139 var pushUserEmailRegistrationCompletedStepX = function (step) { 140 dataLayer.push({ 141 'event': 'userRegistration', 142 'eventCategory': 'form:registration', 143 'eventAction': 'completed_step' + step, 144 'eventLabel': 'email' 145 }); 146 }; 147 148 /** 149 * User Email Registration - Completed Registration 150 * 151 * This information should âpushâ into the dataLayer whenever a user 152 * completes the registration process on the site using the âemailâ 153 * registration type. 154 */ 155 var pushUserEmailRegistrationCompletedRegistration = function (accountType, gigyaId, userType) { 156 //let accountType = ''; 157 dataLayer.push({ 158 'event': 'userRegistration', 159 'eventCategory': 'form:registration', 160 'eventAction': 'completed_registration', 161 'eventLabel': 'email', 162 'accountType': accountType, 163 'gigyaID': gigyaId, 164 'registrationType': 'email', 165 'userType': userType, 166 'registrationSubmitted': 1, 167 'registrationSubmitted:email': 1 168 }); 169 }; 170 171 /** 172 * User Email Registration - Error with Step X Completion 173 * 174 * This information should âpushâ into the dataLayer whenever a user 175 * encounters an error when trying to complete a step in the âUser 176 * Registrationâ process on the site using the âemailâ registration type. 177 * This information should NOT âpushâ into the dataLayer when a user 178 * encounters an error when trying complete the final step of the 179 * registration process - that should be handled by the next event in this 180 * guide. 181 */ 182 var pushUserEmailRegistrationErrorWithStepXCompletion = function (step) { 183 dataLayer.push({ 184 'event': 'userRegistration', 185 'eventCategory': 'form:registration', 186 'eventAction': 'completed_step' + step + '_error', 187 'eventLabel': 'email' 188 }); 189 }; 190 191 /** 192 * User Email Registration - Error with Completed Registration 193 * 194 * This information should âpushâ into the dataLayer whenever a user 195 * encounters an error when trying to complete the registration process on 196 * the site using the âemailâ registration type. 197 */ 198 var pushUserEmailRegistrationErrorWithCompletedRegistration = function () { 199 dataLayer.push({ 200 'event': 'userRegistration', 201 'eventCategory': 'form:registration', 202 'eventAction': 'completed_registration_error', 203 'eventLabel': 'email', 204 'registrationError': 1, 205 'registrationError:email': 1 206 }); 207 }; 208 209 /** 210 * User Social Registration - Completed Step X 211 * 212 * This information should âpushâ into the dataLayer whenever a user 213 * completes a step in the âUser Registrationâ process on the site using the 214 * âsocialâ registration type. This information should NOT âpushâ into the 215 * dataLayer when a user completes the registration process - that should be 216 * handled by the next event in this guide. 217 */ 218 var pushUserSocialRegistrationCompletedStepX = function (step, mediaNetwork) { 219 // https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/41532ab870b21014bbc5a10ce4041860.html?locale=en-US&q=onBeforeValidation 220 dataLayer.push({ 221 'event': 'userRegistration', 222 'eventCategory': 'form:registration', 223 'eventAction': 'completed_step' + step, 224 'eventLabel': mediaNetwork, 225 'socialMedia': mediaNetwork 226 }); 227 }; 228 229 /** 230 * User Social Registration - Completed Registration 231 * 232 * This information should âpushâ into the dataLayer whenever a user 233 * completes the registration process on the site using the âsocialâ 234 * registration type. 235 */ 236 var pushUserSocialRegistrationCompletedRegistration = function (mediaNetwork, accountType, gigyaId, userType) { 237 dataLayer.push({ 238 'event': 'userRegistration', 239 'eventCategory': 'form:registration', 240 'eventAction': 'completed_registration', 241 'eventLabel': mediaNetwork, 242 'accountType': accountType, 243 'gigyaID': gigyaId, 244 'registrationType': 'social', 245 'socialMedia': mediaNetwork, 246 'userType': userType, 247 'registrationSubmitted': 1, 248 'registrationSubmitted:social': 1 249 }); 250 }; 251 252 /** 253 * User Social Registration - Error with Step X Completion 254 * 255 * This information should âpushâ into the dataLayer whenever a user 256 * encounters an error when trying to complete a step in the âUser 257 * Registrationâ process on the site using the âsocialâregistration type. 258 * This information should NOT âpushâ into the dataLayer when a user 259 * encounters an error when trying to complete the final step of the 260 * registration process - that should be handled by the next event in this 261 * guide. 262 */ 263 var pushUserSocialRegistrationErrorWithStepXCompletion = function (step, mediaNetwork) { 264 dataLayer.push({ 265 'event': 'userRegistration', 266 'eventCategory': 'form:registration', 267 'eventAction': 'completed_step' + step + '_error', 268 'eventLabel': mediaNetwork, 269 'socialMedia': mediaNetwork 270 }); 271 }; 272 273 /** 274 * User Social Registration - Error with Completed Registration 275 * 276 * This information should âpushâ into the dataLayer whenever a user 277 * encounters an error when trying to complete the registration process on 278 * the site using the âsocialâ registration type. 279 */ 280 var pushUserSocialRegistrationErrorWithCompletedRegistration = function (mediaNetwork) { 281 dataLayer.push({ 282 'event': 'userRegistration', 283 'eventCategory': 'form:registration', 284 'eventAction': 'completed_registration_error', 285 'eventLabel': mediaNetwork, 286 'registrationError': 1, 287 'registrationError:social': 1 288 }); 289 }; 290 291 /** 292 * User Email Login - Started 293 * 294 * This information should âpushâ into the dataLayer whenever a user starts 295 * the process of logging-in on the site with the âemailâ login type. 296 * */ 297 var pushUserEmailLoginStarted = function () { 298 dataLayer.push({ 299 'event': 'userLogin', 300 'eventCategory': 'account', 301 'eventAction': 'login-started:email', 302 'eventLabel': 'email', 303 'login-started': 1, 304 'login-started:email': 1 305 }); 306 }; 307 308 /** 309 * User Social Login - Started 310 * 311 * This information should âpushâ into the dataLayer whenever a user starts 312 * the process of logging-in on the site with the âsocialâ login type. 313 * */ 314 var pushUserSocialLoginStarted = function (mediaNetwork) { 315 dataLayer.push({ 316 'event': 'userLogin', 317 'eventCategory': 'account', 318 'eventAction': 'login-started:social', 319 'eventLabel': mediaNetwork, 320 'socialMedia': mediaNetwork, 321 'login-started': 1, 322 'login-started:social': 1 323 }); 324 }; 325 326 /** 327 * User Email Login - Successful Login 328 * 329 * This information should âpushâ into the dataLayer whenever a user 330 * successfully logs in to the site using the âemailâ login type. 331 */ 332 var pushUserEmailLoginSuccessfulLogin = function (accountType, gigyaId, userType) { 333 dataLayer.push({ 334 'event': 'userLogin', 335 'eventCategory': 'account', 336 'eventAction': 'login-successful', 337 'eventLabel': 'email', 338 'accountType': accountType, 339 'loginStatus': 'yes', 340 'loginType': 'email', 341 'gigyaID': gigyaId, 342 'userType': userType, 343 'login-completed': 1, 344 'login-completed:email': 1 345 }); 346 }; 347 348 /** 349 * User Social Login - Successful Login 350 * 351 * This information should âpushâ into the dataLayer whenever a user 352 * successfully logs in to the site using the âsocialâ login type. 353 */ 354 var pushUserSocialLoginSuccessfulLogin = function (mediaNetwork, gigyaId) { 355 dataLayer.push({ 356 'event': 'userLogin', 357 'eventCategory': 'account', 358 'eventAction': 'login-successful', 359 'eventLabel': mediaNetwork, 360 'loginStatus': 'yes', 361 'loginType': 'social', 362 'gigyaID': gigyaId, 363 'socialMedia': mediaNetwork, 364 'login-completed': 1, 365 'login-completed:social': 1 366 }); 367 }; 368 369 /** 370 * User Email Login - Error with Login 371 * 372 * This information should âpushâ into the dataLayer whenever a user 373 * encounters an error when trying to login to the site using the âemailâ 374 * login type. 375 */ 376 var pushUserEmailLoginErrorWithLogin = function () { 377 dataLayer.push({ 378 'event': 'userLogin', 379 'eventCategory': 'account', 380 'eventAction': 'login-error', 381 'eventLabel': 'email', 382 'login-error': 1 383 }); 384 }; 385 386 /** 387 * User Social Login - Error with Login 388 * 389 * This information should âpushâ into the dataLayer whenever a user 390 * encounters an error when trying to login to the site using the âsocialâ 391 * login type. 392 */ 393 var pushUserSocialLoginErrorWithLogin = function (mediaNetwork) { 394 dataLayer.push({ 395 'event': 'userLogin', 396 'eventCategory': 'account', 397 'eventAction': 'login-error', 398 'eventLabel': mediaNetwork, 399 'login-error': 1 400 }); 401 }; 402 403 /** 404 * User Email Login - Completion Screen 405 * 406 * This information should âpushâ into the dataLayer whenever a user reaches 407 * the completion screen of the login process using the âemailâ login type. 408 */ 409 var pushUserEmailLoginCompletionScreen = function () { 410 dataLayer.push({ 411 'event': 'userLogin', 412 'eventCategory': 'account', 413 'eventAction': 'completionScreen', 414 'eventLabel': 'email', 415 'login-error': 1 416 }); 417 }; 418 419 /** 420 * User Social Login - Account Link 421 * 422 * This information should âpushâ into the dataLayer whenever a user logs in 423 * with the âsocialâ login type and their account is âlinkedâ to a Gigya 424 * account. 425 * */ 426 var pushUserSocialLoginAccountLink = function (mediaNetwork) { 427 dataLayer.push({ 428 'event': 'userLogin', 429 'eventCategory': 'account', 430 'eventAction': 'login-accountLink', 431 'eventLabel': mediaNetwork, 432 'socialMedia': mediaNetwork 433 }); 434 }; 435 436 // Public 437 window.gigyaGTM = { 438 pushUserEmailRegistrationCompletedStepX: pushUserEmailRegistrationCompletedStepX, 439 pushUserEmailRegistrationCompletedRegistration: pushUserEmailRegistrationCompletedRegistration, 440 pushUserEmailRegistrationErrorWithStepXCompletion: pushUserEmailRegistrationErrorWithStepXCompletion, 441 pushUserEmailRegistrationErrorWithCompletedRegistration: pushUserEmailRegistrationErrorWithCompletedRegistration, 442 pushUserSocialRegistrationCompletedStepX: pushUserSocialRegistrationCompletedStepX, 443 pushUserSocialRegistrationCompletedRegistration: pushUserSocialRegistrationCompletedRegistration, 444 pushUserSocialRegistrationErrorWithStepXCompleti
444on: pushUserSocialRegistrationErrorWithStepXCompletion, 445 pushUserSocialRegistrationErrorWithCompletedRegistration: pushUserSocialRegistrationErrorWithCompletedRegistration, 446 pushUserEmailLoginStarted: pushUserEmailLoginStarted, 447 pushUserEmailLoginSuccessfulLogin: pushUserEmailLoginSuccessfulLogin, 448 pushUserEmailLoginCompletionScreen: pushUserEmailLoginCompletionScreen, 449 pushUserSocialLoginStarted: pushUserSocialLoginStarted, 450 pushUserSocialLoginSuccessfulLogin: pushUserSocialLoginSuccessfulLogin, 451 pushUserEmailLoginErrorWithLogin: pushUserEmailLoginErrorWithLogin, 452 pushUserSocialLoginErrorWithLogin: pushUserSocialLoginErrorWithLogin, 453 pushUserSocialLoginAccountLink: pushUserSocialLoginAccountLink 454 }; 455})(); 456
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.