This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| // Measure a view of product details. This example assumes the detail view occurs on pageload, | |
| // and also tracks a standard pageview of the details page. | |
| dataLayer.push({ | |
| 'ecommerce': { | |
| 'detail': { | |
| 'actionField': {'list': 'Apparel Gallery'}, // 'detail' actions have an optional list property. | |
| 'products': [{ | |
| 'name': 'Triblend Android T-Shirt', // Name or ID is required. | |
| 'id': '12345', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| /** | |
| * Call this function when a user clicks on a product link. This function uses the event | |
| * callback datalayer variable to handle navigation after the ecommerce data has been sent | |
| * to Google Analytics. | |
| * @param {Object} productObj An object representing a product. | |
| */ | |
| function(productObj) { | |
| dataLayer.push({ | |
| 'event': 'productClick', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| // Measures product impressions and also tracks a standard | |
| // pageview for the tag configuration. | |
| // Product impressions are sent by pushing an impressions object | |
| // containing one or more impressionFieldObjects. | |
| dataLayer.push({ | |
| 'ecommerce': { | |
| 'currencyCode': 'EUR', // Local currency is optional. | |
| 'impressions': [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function() { | |
| var ecommerceData = { | |
| 'ecommerce' : { | |
| currencyCode : 'EUR', | |
| // añada parámetros adicionales según sea necesario… | |
| } | |
| }; | |
| return ecommerceData; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| window.dataLayer = window.dataLayer || [] | |
| dataLayer.push({ | |
| 'transactionId': '1234', | |
| 'transactionAffiliation': 'Moda Filomena', | |
| 'transactionTotal': 38.26, | |
| 'transactionTax': 1.29, | |
| 'transactionShipping': 5, | |
| 'transactionProducts': [{ | |
| 'sku': 'DD44', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Facebook Custom Audience Pixel Code - Placed on Every Page of Site --> | |
| <script> | |
| !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
| n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; | |
| n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; | |
| t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, | |
| document,'script','//connect.facebook.net/en_US/fbevents.js'); | |
| fbq('init', '{{facebook pixel}}'); | |
| fbq('track', 'PageView'); | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * | |
| * Heat Map Creation Tool - with Devices | |
| * | |
| * This script calculates the smoothed average performance of each hour of each day | |
| * of the week, and outputs this into a heat map and graph in a Google Sheet. This | |
| * can be done for all data and for device data. It also suggests ad schedules and | |
| * device bid adjustments based on conversion rates. | |
| * | |
| * Version: 2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| school = 'Massachusetts Institute of Technology' | |
| numVowels = 0 | |
| numCons = 0 | |
| for char in school: | |
| if char == 'a' or char == 'e' or char == 'i' \ | |
| or char == 'o' or char == 'u': | |
| numVowels += 1 | |
| elif char == 'o' or char == 'M': | |
| print(char) |
NewerOlder