Course Content
7. iFrame Tracking
iFrame tracking is one of the most challenging aspects of conversion tracking. The objective of this module is to mitigate those challenges so we can successfully track any type of iFrame form and other iframe-related interactions.
0/7
8. Customer DataLayer – Dynamic Pricing Table Tracking
Sometimes, all buttons and links on a page share the same class, ID, or selector. In such cases, it becomes quite challenging to track events separately and collect accurate event parameters. In this module, we’ll learn how to track custom and complex events in a dynamic and efficient way.
0/2
9. Custom DataLayer – eCommerce Site’s Data Layer Creation
In this module, we will learn how to use our HTML, CSS, and JavaScript knowledge to create an ecommerce dataLayer.
0/6
11. Guidelines & Resources for Your Journey to Becoming a Rock Star
JavaScript & Technical Analytics BootCamp – May 2025 (Language: Bangla)

Array Map: map()

map() is used to create a new array by doing something to each item in the original array.

var items = [
    {
        "index": 1,
        "item_id": "41499884552324",
        "product_id": "7135045746820",
        "variant_id": "41499884552324",
        "item_name": "7 Shakra Bracelet",
        "quantity": 2,
        "price": 5400,
        "discount": 0,
        "item_category": "Bracelet",
        "item_brand": "Company 123",
        "item_variant": "Blue"
    },
    {
        "index": 2,
        "item_id": "41499881439364",
        "product_id": "7135044173956",
        "variant_id": "41499881439364",
        "item_name": "Black Leather Bag",
        "quantity": 1,
        "price": 3800,
        "discount": 0,
        "item_brand": "partners-demo"
    }
];

var contentIds = items.map(function(item) {
  var itemId = item.item_id;
  return itemId;
});

console.log(contentIds); // ['41499884552324', '41499881439364']

var items = [
    {
        "index": 1,
        "item_id": "41499884552324",
        "product_id": "7135045746820",
        "variant_id": "41499884552324",
        "item_name": "7 Shakra Bracelet",
        "quantity": 2,
        "price": 5400,
        "discount": 0,
        "item_category": "Bracelet",
        "item_brand": "Company 123",
        "item_variant": "Blue"
    },
    {
        "index": 2,
        "item_id": "41499881439364",
        "product_id": "7135044173956",
        "variant_id": "41499881439364",
        "item_name": "Black Leather Bag",
        "quantity": 1,
        "price": 3800,
        "discount": 0,
        "item_brand": "partners-demo"
    }
];

var remarketingItems = items.map(function(item) {
  var remarketingItem = {
    id: item.item_id,
    google_business_vertical: 'retail'
  }
  
  return remarketingItem;
});

console.log(remarketingItems); // log result

 

var items = [
    {
        "index": 1,
        "item_id": "41499884552324",
        "product_id": "7135045746820",
        "variant_id": "41499884552324",
        "item_name": "7 Shakra Bracelet",
        "quantity": 2,
        "price": 5400,
        "discount": 0,
        "item_category": "Bracelet",
        "item_brand": "Company 123",
        "item_variant": "Blue"
    },
    {
        "index": 2,
        "item_id": "41499881439364",
        "product_id": "7135044173956",
        "variant_id": "41499881439364",
        "item_name": "Black Leather Bag",
        "quantity": 1,
        "price": 3800,
        "discount": 0,
        "item_brand": "partners-demo"
    }
];

var contents = items.map(function(item) {
  var content = {
    id: item.item_id,
    quantity: item.quantity
  }
  
  return content;
});

console.log(contents); // log result
0% Complete

Get A Quote

Please contact us for expert guidance & personalized solutions to maximizing the potential of Google Analytics for your business.

Send Us A Message

    Contact Us

    Please contact us for expert guidance & personalized solutions to maximizing the potential of Google Analytics for your business.

    Send Us A Message