Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solicitação de variáveis - Padrão do Facebook #15

Open
larissa-psantos opened this issue Apr 11, 2024 · 0 comments
Open

Solicitação de variáveis - Padrão do Facebook #15

larissa-psantos opened this issue Apr 11, 2024 · 0 comments

Comments

@larissa-psantos
Copy link

Nos eventos de ViewContent e AddToCart não recebo pelo datalayer o parâmetro de quantity.
Em ViewContent estou usando quantity: 1 (estático), e no AddToCart pelo querySelector, que aparentemente está funcionando.
Plataforma Magazord. Site: https://www.arandustore.com.br/
Datalayer nesses eventos: {
PageType: "ProductPage",
sku: "BBB-Bordo",
name: "Bermuda Lisa Valência",
variant: "Bordô",
skuGroup: "BBB",
price: 26.9,
event: "view_item",
gtm: {uniqueEventId: 4, start: 1712841406993},
eventModel: {
items: [
{
id: "BBB",
name: "Bermuda Lisa Valência",
category: "Bermudas,Masculina",
brand: "Arandu",
variant: "Bordô",
price: 26.9
}
]
}
}

Variável que estou utilizando:
function () {
var id = {{dlv - eventModel.items.0.id}};
var quantity = {{jsc - quantity}};

var contents = {
    id: id,
    quantity: quantity
};
return [contents];

}

** quantity:
function () {
var quantity = document.querySelector("#prod-qtde").value
return quantity
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant