mkfashion-sdk 2.7.0 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mkfashion-sdk",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "SDK para integrar o provador virtual mKFashion com suporte a Wake Commerce e tracking analytics completo",
5
5
  "main": "src/mkfashion.js",
6
6
  "scripts": {
package/src/mkfashion.js CHANGED
@@ -305,12 +305,17 @@ const mkfashion = {
305
305
  this._log('Disponibilidade recebida', data)
306
306
 
307
307
  // NOTA: availability check é decisão interna (mostra botão ou não) e
308
- // NÃO é emitido pro collector — não traz valor analítico. O sinal de
309
- // "impressão" vem do auto-tracking (page_view), e o sinal de "produto
310
- // tem try-on" vem do page_button_rendered no init().
311
- // Apenas inicializa _config pra que o auto-tracking saiba quem é o projeto.
308
+ // NÃO emite evento pro collector — não traz valor analítico.
309
+ //
310
+ // MAS é o gatilho mais comum em PDPs: a partir daqui temos projectId
311
+ // confirmado e ativamos o auto-tracking (page_view, click, scroll,
312
+ // form, engagement). Sem isso, páginas onde o usuário só visualiza
313
+ // (sem clicar no try-on) ficariam invisíveis no collector.
312
314
  try {
313
315
  if (!this._config) this._config = { projectId: resolved, identifier }
316
+ if (!this._autoTrackInitialized && this.autoTrack !== false) {
317
+ this._initAutoTrack()
318
+ }
314
319
  } catch (_) {}
315
320
 
316
321
  return data