{"version":3,"file":"index-D1i9gjt_.js","sources":["../../../app/javascript/src/explore/services/PageViewTracker/index.js"],"sourcesContent":["const track = ({ href, pathname, search }) => {\n  if ( window.ahoy ) {\n    window.ahoy.trackView({ page: pathname, url: href });\n  }\n\n  if ( window.analytics ) {\n    const analyticsData = { path: pathname, search, url: href };\n    if ( document.getElementById( 'cart_item_product_id' )) {\n      analyticsData.product_id = document.getElementById( 'cart_item_product_id' ).value;\n    }\n    window.analytics.page( analyticsData );\n  }\n};\n\nexport const PageViewTracker = {\n  track,\n};\n"],"names":["track","href","pathname","search","analyticsData","PageViewTracker"],"mappings":"AAAA,MAAMA,EAAQ,CAAC,CAAE,KAAAC,EAAM,SAAAC,EAAU,OAAAC,CAAM,IAAO,CAK5C,GAJK,OAAO,MACV,OAAO,KAAK,UAAU,CAAE,KAAMD,EAAU,IAAKD,EAAM,EAGhD,OAAO,UAAY,CACtB,MAAMG,EAAgB,CAAE,KAAMF,EAAU,OAAAC,EAAQ,IAAKF,CAAM,EACtD,SAAS,eAAgB,0BAC5BG,EAAc,WAAa,SAAS,eAAgB,sBAAwB,EAAC,OAE/E,OAAO,UAAU,KAAMA,CAAe,CAC1C,CACA,EAEaC,EAAkB,CAC7B,MAAAL,CACF"}