This commit is contained in:
rakesh 2022-01-31 12:38:16 +05:30
parent df18b3bcef
commit f761e502e8
22 changed files with 118 additions and 150 deletions

View File

@ -30,8 +30,6 @@
"lodash-humps": "^3.1.5", "lodash-humps": "^3.1.5",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-cookies": "^1.5.13", "vue-cookies": "^1.5.13",
"vue-gtag": "^1.8.0",
"vue-gtm": "3.0.0-vue2",
"vue-meta": "^2.4.0", "vue-meta": "^2.4.0",
"vue-router": "^3.2.0", "vue-router": "^3.2.0",
"vue-tel-input": "^4.4.0", "vue-tel-input": "^4.4.0",

View File

@ -39,7 +39,7 @@
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
<!-- Listrak Analytics Javascript Framework --> <!-- Listrak Analytics Javascript Framework -->
<script type="text/javascript"> <!-- <script type="text/javascript">
var biJsHost = (("https:" == document.location.protocol) ? "https://" : "http://"); var biJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
(function (d, s, id, tid, vid) { (function (d, s, id, tid, vid) {
var js, ljs = d.getElementsByTagName(s)[0]; var js, ljs = d.getElementsByTagName(s)[0];
@ -49,9 +49,9 @@
js.src = biJsHost + "cdn.listrakbi.com/scripts/script.js?m=" + tid + "&v=" + vid; js.src = biJsHost + "cdn.listrakbi.com/scripts/script.js?m=" + tid + "&v=" + vid;
ljs.parentNode.insertBefore(js, ljs); ljs.parentNode.insertBefore(js, ljs);
})(document, 'script', 'ltkSDK', 'yJ3fjhPTdCKx', '1'); })(document, 'script', 'ltkSDK', 'yJ3fjhPTdCKx', '1');
</script> </script>-->
<!--START Pepperjam CODE--> <!--START Pepperjam CODE-->
<script> <!--<script>
(function () { (function () {
var a = document.createElement("script"); var a = document.createElement("script");
a.type = "text/javascript", a.async = !0, a.src = "//container.pepperjam.com/4135755510.js"; a.type = "text/javascript", a.async = !0, a.src = "//container.pepperjam.com/4135755510.js";
@ -62,10 +62,10 @@
b.parentNode.insertBefore(a, b) b.parentNode.insertBefore(a, b)
} }
})(); })();
</script> </script>-->
<!--END Pepperjam CODE--> <!--END Pepperjam CODE-->
<!-- Criteo Homepage Tag --> <!-- Criteo Homepage Tag -->
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script> <!--<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript"> <script type="text/javascript">
window.criteo_q = window.criteo_q || []; window.criteo_q = window.criteo_q || [];
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d"; var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
@ -75,7 +75,7 @@
{ event: "setSiteType", type: deviceType }, { event: "setSiteType", type: deviceType },
// { event: "viewHome" } // { event: "viewHome" }
); );
</script> </script>-->
<!-- END Criteo Home Page Tag --> <!-- END Criteo Home Page Tag -->
</body> </body>

View File

@ -99,7 +99,6 @@
<script> <script>
import Header from "@/components/layout/header/Header"; import Header from "@/components/layout/header/Header";
import { import {
googleAanalyticsEventCategory,
customAttributeValueNew, customAttributeValueNew,
getCategoryOne, getCategoryOne,
} from "@/services/util.service"; } from "@/services/util.service";
@ -289,12 +288,12 @@ export default {
categoryOne.customAttributes, categoryOne.customAttributes,
"url_path" "url_path"
); );
console.log(categoryOne.name, categoryOne); // console.log(categoryOne.name, categoryOne);
googleAanalyticsEventCategory( /*googleAanalyticsEventCategory(
"browse_category", "browse_category",
"ecommerce", "ecommerce",
categoryOne categoryOne
); );*/
let pagePath = this.$route.path; let pagePath = this.$route.path;
let isGateModulePage = pagePath.includes("/gate/"); let isGateModulePage = pagePath.includes("/gate/");
if (isGateModulePage) { if (isGateModulePage) {

View File

@ -631,7 +631,7 @@ export default {
categoryOne.customAttributes, categoryOne.customAttributes,
"url_path" "url_path"
);*/ );*/
console.log(categoryOne.n, categoryOne); // console.log(categoryOne.n, categoryOne);
let vm = this; let vm = this;
goToCategoryPageRouting(vm, categoryOne); goToCategoryPageRouting(vm, categoryOne);
this.$store this.$store

View File

@ -118,7 +118,7 @@
<script> <script>
import SnackbarComponent from "@/components/common/SnackbarComponent"; import SnackbarComponent from "@/components/common/SnackbarComponent";
import SubscriptionDialog from "@/components/common/SubscriptionDialog"; import SubscriptionDialog from "@/components/common/SubscriptionDialog";
import { listrakSubscribe } from "@/services/util.service"; //import { listrakSubscribe } from "@/services/util.service";
export default { export default {
name: "FooterComponent", name: "FooterComponent",
components: { SnackbarComponent, SubscriptionDialog }, components: { SnackbarComponent, SubscriptionDialog },
@ -163,7 +163,7 @@ export default {
}, },
submit: function () { submit: function () {
if (this.$refs.footerForm.validate()) { if (this.$refs.footerForm.validate()) {
listrakSubscribe(this.email); // listrakSubscribe(this.email);
this.snackbar = { this.snackbar = {
message: "you have successfully subscribed.", message: "you have successfully subscribed.",
color: "success", color: "success",

View File

@ -645,7 +645,7 @@ import { doFetchCatelogProducts } from "@/services/product.service";
import HeaderPromoBanner from "@/components/layout/header/HeaderPromoBanner"; import HeaderPromoBanner from "@/components/layout/header/HeaderPromoBanner";
import { import {
customAttributeValueNew, customAttributeValueNew,
googleAanalyticsEventCategory, // googleAanalyticsEventCategory,
getCategoryOne, getCategoryOne,
goToCategoryPageRouting, goToCategoryPageRouting,
} from "@/services/util.service"; } from "@/services/util.service";
@ -956,7 +956,7 @@ export default {
getCustomAttributeValue(customAttributes, attributeCode) { getCustomAttributeValue(customAttributes, attributeCode) {
return customAttributeValueNew(customAttributes, attributeCode); return customAttributeValueNew(customAttributes, attributeCode);
}, },
async categoryProducts(categoryId, categoryDetails) { async categoryProducts(categoryId) {
if (this.categoryDetailsList) { if (this.categoryDetailsList) {
let categoryOne = await getCategoryOne( let categoryOne = await getCategoryOne(
this.categoryDetailsList, this.categoryDetailsList,
@ -967,11 +967,11 @@ export default {
let path = this.getCustomAttributeValue(categoryOne.ca, "url_path"); let path = this.getCustomAttributeValue(categoryOne.ca, "url_path");
this.activeCategoryMenu = categoryId; this.activeCategoryMenu = categoryId;
console.log(categoryOne.n, categoryOne); console.log(categoryOne.n, categoryOne);
googleAanalyticsEventCategory( /* googleAanalyticsEventCategory(
"browse_category", "browse_category",
"ecommerce", "ecommerce",
categoryDetails categoryDetails
); );*/
localStorage.setItem("cr_mainCategoryId", categoryId); localStorage.setItem("cr_mainCategoryId", categoryId);
localStorage.removeItem("cr_subCategoryItemId"); localStorage.removeItem("cr_subCategoryItemId");
localStorage.removeItem("cr_subCategoryId"); localStorage.removeItem("cr_subCategoryId");

View File

@ -17,7 +17,7 @@
" "
> >
<p <p
@click="subCategory(subcategorys.id, subcategorys)" @click="subCategory(subcategorys.id)"
:class="subcategorys.childrenData != '' ? '' : 'mb-1'" :class="subcategorys.childrenData != '' ? '' : 'mb-1'"
class="cursor-pointer text-uppercase regular-font submenu-menu-heading pb-1 primary--text" class="cursor-pointer text-uppercase regular-font submenu-menu-heading pb-1 primary--text"
> >
@ -44,8 +44,7 @@
@click=" @click="
subCategoryProducts( subCategoryProducts(
items.id, items.id,
subcategorys.id, subcategorys.id
items
) )
" "
>{{ items.name }}</v-list-item-title >{{ items.name }}</v-list-item-title
@ -68,7 +67,7 @@
" "
> >
<p <p
@click="subCategory(subcategorys.id, subcategorys)" @click="subCategory(subcategorys.id)"
class="pb-0 cursor-pointer text-uppercase regular-font submenu-menu-heading pb-1 primary--text" class="pb-0 cursor-pointer text-uppercase regular-font submenu-menu-heading pb-1 primary--text"
> >
{{ subcategorys.name }} {{ subcategorys.name }}
@ -112,7 +111,7 @@
</v-card> </v-card>
</template> </template>
<script> <script>
import { googleAanalyticsEventCategory } from "@/services/util.service"; //import { googleAanalyticsEventCategory } from "@/services/util.service";
export default { export default {
name: "subMenu", name: "subMenu",
props: ["subCategoryList", "mainMenu", "subMenuItem"], props: ["subCategoryList", "mainMenu", "subMenuItem"],
@ -131,14 +130,14 @@ export default {
pageName() { pageName() {
return this.$route.name; return this.$route.name;
}, },
subCategory(subCategoryId, categoryDetails) { subCategory(subCategoryId) {
// let subCategoryIdItem = ""; // let subCategoryIdItem = "";
this.$emit("onActionScrollSub"); this.$emit("onActionScrollSub");
googleAanalyticsEventCategory( // googleAanalyticsEventCategory(
"browse_category", // "browse_category",
"ecommerce", // "ecommerce",
categoryDetails // categoryDetails
); // );
this.$emit("action", { this.$emit("action", {
mainMenu: this.mainMenu, mainMenu: this.mainMenu,
subMenu: subCategoryId, subMenu: subCategoryId,
@ -156,14 +155,14 @@ export default {
}); });
}, },
subCategoryProducts(subCategoryIdItem, subCategoryId, categoryDetails) { subCategoryProducts(subCategoryIdItem, subCategoryId) {
//this.subMenu = categoryId; //this.subMenu = categoryId;
this.$emit("onActionScrollSub"); this.$emit("onActionScrollSub");
googleAanalyticsEventCategory( // googleAanalyticsEventCategory(
"browse_category", // "browse_category",
"ecommerce", // "ecommerce",
categoryDetails // categoryDetails
); // );
this.$emit("action", { this.$emit("action", {
mainMenu: this.mainMenu, mainMenu: this.mainMenu,
subMenu: subCategoryId, subMenu: subCategoryId,

View File

@ -23,7 +23,7 @@ import {
customAttributeValue, customAttributeValue,
goToCategoryPageRouting, goToCategoryPageRouting,
getCategoryOne, getCategoryOne,
googleAanalyticsEventCategory, // googleAanalyticsEventCategory,
} from "@/services/util.service"; } from "@/services/util.service";
import { mapState } from "vuex"; import { mapState } from "vuex";
@ -123,10 +123,10 @@ export default {
this.$store.dispatch("layout/setHeroContent", categoryOne); this.$store.dispatch("layout/setHeroContent", categoryOne);
console.log(categoryOne.n, categoryOne); console.log(categoryOne.n, categoryOne);
let vm = this; let vm = this;
googleAanalyticsEventCategory("browse_category", "ecommerce", { // googleAanalyticsEventCategory("browse_category", "ecommerce", {
name: categoryOne.n, // name: categoryOne.n,
id: categoryId, // id: categoryId,
}); // });
goToCategoryPageRouting(vm, categoryOne); goToCategoryPageRouting(vm, categoryOne);
this.$store this.$store
.dispatch("catalogBrowser/search", { .dispatch("catalogBrowser/search", {

View File

@ -561,7 +561,7 @@ import {
customAttributeValue, customAttributeValue,
priceFormatter, priceFormatter,
checkPromotion, checkPromotion,
googleAanalyticsEventRemoveCart // googleAanalyticsEventRemoveCart
} from "@/services/util.service"; } from "@/services/util.service";
import ConfirmationDialog from "@/components/common/ConfirmationDialog"; import ConfirmationDialog from "@/components/common/ConfirmationDialog";
import { doFetchProductTags } from "@/services/product.service"; import { doFetchProductTags } from "@/services/product.service";
@ -640,15 +640,15 @@ export default {
}, },
watch: { watch: {
cartItems() { cartItems() {
this.calledListrakCartList(); // this.calledListrakCartList();
}, },
}, },
methods: { methods: {
calledListrakCartList() { /* calledListrakCartList() {
if (this.userAuth) { if (this.userAuth) {
this.$store.dispatch("userCartProduct/setListrakCartList"); this.$store.dispatch("userCartProduct/setListrakCartList");
} }
}, },*/
changeCheckoutFlag(flag) { changeCheckoutFlag(flag) {
this.$emit("stockFlag", flag); this.$emit("stockFlag", flag);
}, },
@ -1130,7 +1130,7 @@ export default {
await this.$store.dispatch("userCartProduct/removeCartProduct", { await this.$store.dispatch("userCartProduct/removeCartProduct", {
productId: this.productId, productId: this.productId,
}); });
googleAanalyticsEventRemoveCart('remove_from_cart',this.productDetails) // googleAanalyticsEventRemoveCart('remove_from_cart',this.productDetails)
removeCookieByName(this.productId); removeCookieByName(this.productId);
this.snackbar = { this.snackbar = {
message: "Product Removed Successfully", message: "Product Removed Successfully",
@ -1153,7 +1153,7 @@ export default {
"cartProduct/removeCartProduct", "cartProduct/removeCartProduct",
this.productId this.productId
); );
googleAanalyticsEventRemoveCart('remove_from_cart',this.productDetails) //googleAanalyticsEventRemoveCart('remove_from_cart',this.productDetails)
removeCookieByName(this.productId); removeCookieByName(this.productId);
this.snackbar = { this.snackbar = {
message: "Product Removed Successfully", message: "Product Removed Successfully",

View File

@ -195,7 +195,7 @@
import { doFetchCatelogProducts } from "@/services/product.service"; import { doFetchCatelogProducts } from "@/services/product.service";
import { import {
customAttributeValueNew, customAttributeValueNew,
googleAanalyticsEventCategory, //googleAanalyticsEventCategory,
goToCategoryPageRouting, goToCategoryPageRouting,
getCategoryOne, getCategoryOne,
} from "@/services/util.service"; } from "@/services/util.service";
@ -350,7 +350,7 @@ export default {
this.search = null; this.search = null;
} }
}, },
async categoryProducts(categoryId, categoryDetails) { async categoryProducts(categoryId) {
if (this.categoryDetailsList) { if (this.categoryDetailsList) {
let categoryOne = await getCategoryOne( let categoryOne = await getCategoryOne(
this.categoryDetailsList, this.categoryDetailsList,
@ -361,11 +361,11 @@ export default {
let path = this.getCustomAttributeValue(categoryOne.ca, "url_path"); let path = this.getCustomAttributeValue(categoryOne.ca, "url_path");
console.log(categoryOne.n, categoryOne); console.log(categoryOne.n, categoryOne);
this.activeCategoryMenu = categoryId; this.activeCategoryMenu = categoryId;
googleAanalyticsEventCategory( // googleAanalyticsEventCategory(
"browse_category", // "browse_category",
"ecommerce", // "ecommerce",
categoryDetails // categoryDetails
); // );
localStorage.setItem("cr_mainCategoryId", categoryId); localStorage.setItem("cr_mainCategoryId", categoryId);
localStorage.removeItem("cr_subCategoryItemId"); localStorage.removeItem("cr_subCategoryItemId");
localStorage.removeItem("cr_subCategoryId"); localStorage.removeItem("cr_subCategoryId");

View File

@ -383,7 +383,7 @@ const personlizeUrl = process.env.VUE_APP_PERSONALIZE_URL;
const retailorId = process.env.VUE_APP_RETAILOR_ID; const retailorId = process.env.VUE_APP_RETAILOR_ID;
import * as easings from "vuetify/es5/services/goto/easing-patterns"; import * as easings from "vuetify/es5/services/goto/easing-patterns";
import SnackbarComponent from "@/components/common/SnackbarComponent"; import SnackbarComponent from "@/components/common/SnackbarComponent";
import { getLable, customAttributeValue ,googleAanalytics,setCategoryNameInLocal} from "@/services/util.service"; import { getLable, customAttributeValue ,setCategoryNameInLocal} from "@/services/util.service";
//import { getAuthUser } from "@/services/auth"; //import { getAuthUser } from "@/services/auth";
export default { export default {
productDefaultImage:require('@/assets/defaultProduct.jpg'), productDefaultImage:require('@/assets/defaultProduct.jpg'),
@ -604,7 +604,7 @@ export default {
optionValue: this.optionValue optionValue: this.optionValue
}) })
.then((res) => { .then((res) => {
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce'); // googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
if(this.categoryId) if(this.categoryId)
{ {
setCategoryNameInLocal(this.categoryId,res); setCategoryNameInLocal(this.categoryId,res);
@ -649,7 +649,7 @@ export default {
optionValue: this.optionValue optionValue: this.optionValue
}) })
.then((res) => { .then((res) => {
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce'); // googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
if(this.categoryId) if(this.categoryId)
{ {
setCategoryNameInLocal(this.categoryId,res); setCategoryNameInLocal(this.categoryId,res);

View File

@ -492,7 +492,7 @@
<script> <script>
//const personlizeUrl = process.env.VUE_APP_PERSONALIZE_URL; //const personlizeUrl = process.env.VUE_APP_PERSONALIZE_URL;
import SnackbarComponent from "@/components/common/SnackbarComponent"; import SnackbarComponent from "@/components/common/SnackbarComponent";
import { getLable ,googleAanalytics,customAttributeValue,setCategoryNameInLocal} from "@/services/util.service"; import { getLable ,customAttributeValue,setCategoryNameInLocal} from "@/services/util.service";
import { createHelpers } from "vuex-map-fields"; import { createHelpers } from "vuex-map-fields";
import * as easings from "vuetify/es5/services/goto/easing-patterns"; import * as easings from "vuetify/es5/services/goto/easing-patterns";
@ -692,7 +692,7 @@ export default {
senderEmail: this.one.email senderEmail: this.one.email
}) })
.then((res) => { .then((res) => {
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce'); // googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
if(this.categoryId) if(this.categoryId)
{ {
setCategoryNameInLocal(this.categoryId,res); setCategoryNameInLocal(this.categoryId,res);
@ -722,7 +722,7 @@ export default {
qty: this.selectedQty qty: this.selectedQty
}) })
.then((res) => { .then((res) => {
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce'); // googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
if(this.categoryId) if(this.categoryId)
{ {
setCategoryNameInLocal(this.categoryId,res); setCategoryNameInLocal(this.categoryId,res);

View File

@ -450,7 +450,7 @@ const personlizeUrl = process.env.VUE_APP_PERSONALIZE_URL;
const retailorId = process.env.VUE_APP_RETAILOR_ID; const retailorId = process.env.VUE_APP_RETAILOR_ID;
import * as easings from "vuetify/es5/services/goto/easing-patterns"; import * as easings from "vuetify/es5/services/goto/easing-patterns";
import SnackbarComponent from "@/components/common/SnackbarComponent"; import SnackbarComponent from "@/components/common/SnackbarComponent";
import { priceFormatter, getLable, customAttributeValue ,googleAanalytics,googleAanalyticsEvent, criteoForCurrentProduct ,setCategoryNameInLocal} from "@/services/util.service"; import { priceFormatter, getLable, customAttributeValue , /*criteoForCurrentProduct, */setCategoryNameInLocal} from "@/services/util.service";
//import { getAuthUser } from "@/services/auth"; //import { getAuthUser } from "@/services/auth";
/* eslint-disable no-alert, no-console , no-debugger */ /* eslint-disable no-alert, no-console , no-debugger */
export default { export default {
@ -600,7 +600,7 @@ export default {
watch: { watch: {
productDetails() { productDetails() {
this.imagepath = this.productDetails.mediaGalleryEntries && this.productDetails.mediaGalleryEntries.length ? this.productDetails.mediaGalleryEntries[0].file:""; this.imagepath = this.productDetails.mediaGalleryEntries && this.productDetails.mediaGalleryEntries.length ? this.productDetails.mediaGalleryEntries[0].file:"";
criteoForCurrentProduct(this.productDetails.id); // criteoForCurrentProduct(this.productDetails.id);
} }
/* qtyPriceOptions() /* qtyPriceOptions()
{ {
@ -630,7 +630,7 @@ export default {
personalizeDetails: null personalizeDetails: null
}) })
.then((res) => { .then((res) => {
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce'); // googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
if(this.categoryId) if(this.categoryId)
{ {
setCategoryNameInLocal(this.categoryId,res); setCategoryNameInLocal(this.categoryId,res);
@ -676,7 +676,7 @@ export default {
personalizeDetails: null personalizeDetails: null
}) })
.then((res) => { .then((res) => {
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce'); // googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
if(this.categoryId) if(this.categoryId)
{ {
setCategoryNameInLocal(this.categoryId,res); setCategoryNameInLocal(this.categoryId,res);
@ -834,7 +834,7 @@ export default {
"builder_version" "builder_version"
) === "" ) === ""
) { ) {
googleAanalyticsEvent('personalize_cc', 'ecommerce', productDetails); // googleAanalyticsEvent('personalize_cc', 'ecommerce', productDetails);
this.$router.push({ this.$router.push({
name: "CraneConnection", name: "CraneConnection",
params: { params: {
@ -845,7 +845,7 @@ export default {
}); });
} else { } else {
let itemCode = this.itemId ? this.itemId : "new"; let itemCode = this.itemId ? this.itemId : "new";
googleAanalyticsEvent('personalize_builder', 'ecommerce', productDetails); //googleAanalyticsEvent('personalize_builder', 'ecommerce', productDetails);
debugger debugger
if(this.categoryId) if(this.categoryId)
{ {

View File

@ -213,7 +213,7 @@
sm="4" sm="4"
cols="12" cols="12"
class="pr-lg-4 cursor-pointer pt-lg-6" class="pr-lg-4 cursor-pointer pt-lg-6"
@click="gotoProductDetails(product.n,product)" @click="gotoProductDetails(product.n)"
> >
<v-img <v-img
:src="imageBasePathUrl + product.i + imageBaseParams" :src="imageBasePathUrl + product.i + imageBaseParams"
@ -325,10 +325,7 @@ import { createHelpers } from "vuex-map-fields";
import { mapState } from "vuex"; import { mapState } from "vuex";
import CategoryHeroContent from "@/components/retailer/category/CategoryHeroContent"; import CategoryHeroContent from "@/components/retailer/category/CategoryHeroContent";
import FilterComponent from "../filter/FilterComponent"; import FilterComponent from "../filter/FilterComponent";
import {
googleAanalyticsEventCategoryPage,
googleAanalyticsEventSelectContent
} from "@/services/util.service";
const { mapFields } = createHelpers({ const { mapFields } = createHelpers({
getterType: "catalogBrowser/getField", getterType: "catalogBrowser/getField",
mutationType: "catalogBrowser/updateField" mutationType: "catalogBrowser/updateField"
@ -409,13 +406,13 @@ export default {
} }
}, },
searchResults(){ searchResults(){
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId) // googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
}, },
keywords(){ keywords(){
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId) // googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
}, },
categoryId(){ categoryId(){
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId) // googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
}, },
pageSize() { pageSize() {
if (this.pageSize != "ALL" && this.totalProducts) { if (this.pageSize != "ALL" && this.totalProducts) {
@ -455,7 +452,7 @@ export default {
}); });
this.pageNumber=1; this.pageNumber=1;
this.$emit("criteriaChanged"); this.$emit("criteriaChanged");
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId) // googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
}, },
setFilterValue() { setFilterValue() {
@ -466,7 +463,7 @@ export default {
this.closeFilterMenu = true; this.closeFilterMenu = true;
this.pageNumber=1; this.pageNumber=1;
this.$emit("criteriaChanged"); this.$emit("criteriaChanged");
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId) // googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
}, },
async actionClear() { async actionClear() {
@ -480,8 +477,8 @@ export default {
} }
}, 200); }, 200);
}, },
gotoProductDetails(productName,product) { gotoProductDetails(productName) {
googleAanalyticsEventSelectContent('select_content',product,this.categoryId) // googleAanalyticsEventSelectContent('select_content',product,this.categoryId)
this.$router.push({ this.$router.push({
name: productName, name: productName,
query: { query: {
@ -491,16 +488,16 @@ export default {
}, },
pageViewChange() { pageViewChange() {
this.$emit("criteriaChanged"); this.$emit("criteriaChanged");
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId) //googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
}, },
pageSizeWiseProduct() { pageSizeWiseProduct() {
this.updatePageNumber(); this.updatePageNumber();
this.$emit("criteriaChanged"); this.$emit("criteriaChanged");
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId) // googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
}, },
sortAndNextPage() { sortAndNextPage() {
this.$emit("criteriaChanged"); this.$emit("criteriaChanged");
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId) //googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
}, },
scrollToTop() { scrollToTop() {
window.scrollTo(0, 0); window.scrollTo(0, 0);
@ -523,7 +520,7 @@ export default {
created() { created() {
if(this.searchTerms) if(this.searchTerms)
{ {
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId) // googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
} }
if (this.totalProducts) if (this.totalProducts)
this.totalVisiblePages = Math.ceil( this.totalVisiblePages = Math.ceil(

View File

@ -6,11 +6,8 @@ import vuetify from './plugins/vuetify'
import "vuetify/dist/vuetify.min.css"; import "vuetify/dist/vuetify.min.css";
import router from './multipages' import router from './multipages'
import store from '@/stores'; import store from '@/stores';
import VueGtag from "vue-gtag";
import VueGtm from 'vue-gtm';
import VueMeta from 'vue-meta' import VueMeta from 'vue-meta'
const gtagId = process.env.VUE_APP_GTAG_ID;
const gaId = process.env.VUE_APP_GA_ID;
Vue.use(VueCookies); Vue.use(VueCookies);
@ -20,21 +17,6 @@ Vue.use(VueCookies);
// load: { key: 'AIzaSyDmHp0PPuKHD1KGHCDmLq1qQKr_03XKEHo', libraries: ['places', 'geometry'] } // load: { key: 'AIzaSyDmHp0PPuKHD1KGHCDmLq1qQKr_03XKEHo', libraries: ['places', 'geometry'] }
// }); // });
Vue.use(VueGtm, {
id: gtagId, // Your GTM single container ID or array of container ids ['GTM-xxxxxx', 'GTM-yyyyyy']
// queryParams: { // Add url query string when load gtm.js with GTM ID (optional)
// gtm_auth:'AB7cDEf3GHIjkl-MnOP8qr',
// gtm_preview:'env-4',
// gtm_cookies_win:'x'
// },
defer: false, // defaults to false. Script can be set to `defer` to increase page-load-time at the cost of less accurate results (in case visitor leaves before script is loaded, which is unlikely but possible)
enabled: true, // defaults to true. Plugin can be disabled by setting this to false for Ex: enabled: !!GDPR_Cookie (optional)
debug: false, // Whether or not display console logs debugs (optional)
loadScript: true, // Whether or not to load the GTM Script (Helpful if you are including GTM manually, but need the dataLayer functionality in your components) (optional)
vueRouter: router, // Pass the router instance to automatically sync with router (optional)
// ignoredViews: ['main', 'homepage'], // Don't trigger events for specified router names (case insensitive) (optional)
trackOnNextTick: false, // Whether or not call trackView in Vue.nextTick
});
Vue.use(VueMeta, { Vue.use(VueMeta, {
// optional pluginOptions // optional pluginOptions
@ -42,13 +24,6 @@ Vue.use(VueMeta, {
}) })
Vue.use(VueGtag, {
config: {
id: gaId, params: {
send_page_view: true
}
}
}, router);
Vue.config.productionTip = false Vue.config.productionTip = false

View File

@ -283,15 +283,15 @@ export default {
watch: { watch: {
cartProductsItem() { cartProductsItem() {
this.stockFlagHideShow(); this.stockFlagHideShow();
this.calledCriteoViewBasket(); // this.calledCriteoViewBasket();
}, },
}, },
methods: { methods: {
calledCriteoViewBasket() { /* calledCriteoViewBasket() {
if (this.userAuth) { if (this.userAuth) {
this.$store.dispatch("userCartProduct/setCriteoViewBasket"); this.$store.dispatch("userCartProduct/setCriteoViewBasket");
} }
}, },*/
removeMinus(val) { removeMinus(val) {
if (val) return val.toString().substring(1); if (val) return val.toString().substring(1);
}, },

View File

@ -1172,13 +1172,13 @@ import CardPayment from "@/components/retailer/payment/CardPayment";
import { createHelpers } from "vuex-map-fields"; import { createHelpers } from "vuex-map-fields";
import { VueTelInput } from "vue-tel-input"; import { VueTelInput } from "vue-tel-input";
import { import {
googleAanalyticsPurchase, // googleAanalyticsPurchase,
googleAanalyticsCheckout, // googleAanalyticsCheckout,
// checkEncodeURI, // checkEncodeURI,
priceFormatter, priceFormatter,
fetchStates, fetchStates,
googleAanalyticsCheckoutAddShippingInfo, // googleAanalyticsCheckoutAddShippingInfo,
googleAanalyticsCheckoutAddPaymentInfo, // googleAanalyticsCheckoutAddPaymentInfo,
} from "@/services/util.service"; } from "@/services/util.service";
const braintreeAuthKey = process.env.VUE_APP_BRAINTREE_AUTH_KEY; const braintreeAuthKey = process.env.VUE_APP_BRAINTREE_AUTH_KEY;
@ -1429,11 +1429,11 @@ export default {
let cartList = []; let cartList = [];
if (this.userAuth) { if (this.userAuth) {
cartList = this.$store.state.userCartProduct.cartProductList; cartList = this.$store.state.userCartProduct.cartProductList;
googleAanalyticsCheckout("begin_checkout", { items: cartList }); // googleAanalyticsCheckout("begin_checkout", { items: cartList });
return cartList; return cartList;
} else { } else {
cartList = this.$store.state.cartProduct.cartProductList; cartList = this.$store.state.cartProduct.cartProductList;
googleAanalyticsCheckout("begin_checkout", { items: cartList }); // googleAanalyticsCheckout("begin_checkout", { items: cartList });
return cartList; return cartList;
} }
}, },
@ -1914,11 +1914,11 @@ export default {
googleAanalyticsCheckout("set_checkout_option", { googleAanalyticsCheckout("set_checkout_option", {
checkout_step: 1, checkout_step: 1,
checkout_option: "shipping method", checkout_option: "shipping method",
});*/ });
googleAanalyticsCheckoutAddShippingInfo( googleAanalyticsCheckoutAddShippingInfo(
"add_shipping_info", "add_shipping_info",
this.cartProductsItem this.cartProductsItem
); );*/
this.valid = true; this.valid = true;
this.tabs = "reviewTab"; this.tabs = "reviewTab";
} }
@ -1933,11 +1933,11 @@ export default {
googleAanalyticsCheckout("set_checkout_option", { googleAanalyticsCheckout("set_checkout_option", {
checkout_step: 1, checkout_step: 1,
checkout_option: "shipping method", checkout_option: "shipping method",
});*/ });
googleAanalyticsCheckoutAddShippingInfo( googleAanalyticsCheckoutAddShippingInfo(
"add_shipping_info", "add_shipping_info",
this.cartProductsItem this.cartProductsItem
); );*/
this.valid = true; this.valid = true;
this.tabs = "reviewTab"; this.tabs = "reviewTab";
} }
@ -1962,11 +1962,11 @@ export default {
googleAanalyticsCheckout("set_checkout_option", { googleAanalyticsCheckout("set_checkout_option", {
checkout_step: 1, checkout_step: 1,
checkout_option: "shipping method", checkout_option: "shipping method",
});*/ });
googleAanalyticsCheckoutAddShippingInfo( googleAanalyticsCheckoutAddShippingInfo(
"add_shipping_info", "add_shipping_info",
this.cartProductsItem this.cartProductsItem
); );*/
this.$store.dispatch("guestInfo/setShippingInformation", { this.$store.dispatch("guestInfo/setShippingInformation", {
method: this.estimatedShipping, method: this.estimatedShipping,
@ -2120,13 +2120,13 @@ export default {
googleAanalyticsCheckout("set_checkout_option", { googleAanalyticsCheckout("set_checkout_option", {
checkout_step: 1, checkout_step: 1,
checkout_option: "payment", checkout_option: "payment",
});*/ });
googleAanalyticsCheckoutAddPaymentInfo( googleAanalyticsCheckoutAddPaymentInfo(
"add_payment_info", "add_payment_info",
resp resp
); );
googleAanalyticsPurchase(resp, resp.incrementId); googleAanalyticsPurchase(resp, resp.incrementId);*/
let shippingAddress = []; let shippingAddress = [];
let ccid = ""; let ccid = "";
let webOrderNumber = resp.incrementId; let webOrderNumber = resp.incrementId;
@ -2234,13 +2234,13 @@ export default {
googleAanalyticsCheckout("set_checkout_option", { googleAanalyticsCheckout("set_checkout_option", {
checkout_step: 1, checkout_step: 1,
checkout_option: "payment", checkout_option: "payment",
});*/ });
googleAanalyticsCheckoutAddPaymentInfo( googleAanalyticsCheckoutAddPaymentInfo(
"add_payment_info", "add_payment_info",
resp resp
); );
googleAanalyticsPurchase(resp, resp.incrementId); googleAanalyticsPurchase(resp, resp.incrementId);*/
let shippingAddress = []; let shippingAddress = [];
let ccid = ""; let ccid = "";
let webOrderNumber = resp.incrementId; let webOrderNumber = resp.incrementId;

View File

@ -118,11 +118,11 @@
</v-col> </v-col>
</v-row> </v-row>
</v-container> </v-container>
<img <!--<img
src="https://fp.listrakbi.com/fp/yJ3fjhPTdCKx.jpg" src="https://fp.listrakbi.com/fp/yJ3fjhPTdCKx.jpg"
height="1" height="1"
width="1" width="1"
/> />-->
<FooterComponent /> <FooterComponent />
</div> </div>
</template> </template>

View File

@ -57,7 +57,7 @@ import ProductDetailComponent from "@/components/retailer/product-detail/Product
import ConfiguredProductDetailComponent from "@/components/retailer/product-detail/ConfiguredProductDetailComponent"; import ConfiguredProductDetailComponent from "@/components/retailer/product-detail/ConfiguredProductDetailComponent";
import GiftCardDetailsComponent from "@/components/retailer/product-detail/GiftCardDetailsComponent"; import GiftCardDetailsComponent from "@/components/retailer/product-detail/GiftCardDetailsComponent";
import FooterComponent from "@/components/layout/footer/FooterComponent"; import FooterComponent from "@/components/layout/footer/FooterComponent";
import { getMeta, googleAanalyticsEventPDP } from "@/services/util.service"; import { getMeta } from "@/services/util.service";
export default { export default {
name: "ProductPage", name: "ProductPage",
components: { components: {
@ -144,11 +144,11 @@ export default {
}, },
productDetails() { productDetails() {
if (this.productDetails.name) { if (this.productDetails.name) {
googleAanalyticsEventPDP( // googleAanalyticsEventPDP(
this.productDetails, // this.productDetails,
"view_item", // "view_item",
this.categoryId // this.categoryId
); // );
if ( if (
this.productDetails.stockDetails.backorders == 0 && this.productDetails.stockDetails.backorders == 0 &&
this.productDetails.stockDetails.qty <= 0 this.productDetails.stockDetails.qty <= 0

View File

@ -41,11 +41,11 @@ const beforeEachRoute = (to, from, next) =>{
} }
try { try {
let path = to.path; let path = to.path;
console.log("to path", to); // console.log("to path", to);
if (path.includes("shop/category")) { if (path.includes("shop/category")) {
let routeSplit = path.split("/"); let routeSplit = path.split("/");
let newCategoryRoute = routeSplit.slice(3, routeSplit.length - 5).join("/"); let newCategoryRoute = routeSplit.slice(3, routeSplit.length - 5).join("/");
console.log("new route", newCategoryRoute); // console.log("new route", newCategoryRoute);
next({ path: "/" + newCategoryRoute }); next({ path: "/" + newCategoryRoute });
} }
} catch (error) { } catch (error) {

View File

@ -4,7 +4,7 @@ import { invalidPoBoxAddress } from '@/services/util.service';
import { doFetchQuote } from '@/services/user_cart.service'; import { doFetchQuote } from '@/services/user_cart.service';
import { getField, updateField } from 'vuex-map-fields'; import { getField, updateField } from 'vuex-map-fields';
import humps from 'lodash-humps'; import humps from 'lodash-humps';
import { criteoUpdateUserEmail } from "@/services/util.service"; //import { criteoUpdateUserEmail } from "@/services/util.service";
/*eslint-disable*/ /*eslint-disable*/
const addresses = { const addresses = {
@ -74,7 +74,7 @@ export const accountOne = {
state.countryWiseStates = countryWiseStates state.countryWiseStates = countryWiseStates
}, },
setOne(state, one) { setOne(state, one) {
criteoUpdateUserEmail(one.email) // criteoUpdateUserEmail(one.email)
state.one = Object.assign({}, state.one, defaultAddress, one); state.one = Object.assign({}, state.one, defaultAddress, one);
let customerNumber=state.one.customAttributes let customerNumber=state.one.customAttributes
.filter((customAttribute)=>customAttribute.attributeCode==="customer_number")[0] .filter((customAttribute)=>customAttribute.attributeCode==="customer_number")[0]

View File

@ -20,7 +20,7 @@ import {
import { getField, updateField } from 'vuex-map-fields'; import { getField, updateField } from 'vuex-map-fields';
import humps from 'lodash-humps'; import humps from 'lodash-humps';
import { getAuthUser } from '@/services/auth'; import { getAuthUser } from '@/services/auth';
import { criteoViewBasket ,listrakCartList,listrakCartListClear} from "@/services/util.service"; //import { criteoViewBasket ,listrakCartList,listrakCartListClear} from "@/services/util.service";
/* eslint-disable no-alert, no-console , no-debugger */ /* eslint-disable no-alert, no-console , no-debugger */
export const userCartProduct = { export const userCartProduct = {
namespaced: true, namespaced: true,
@ -77,7 +77,7 @@ export const userCartProduct = {
state.cartProductList = list state.cartProductList = list
// criteoViewBasket(list); // criteoViewBasket(list);
}, },
setCriteoViewBasket(state) { /* setCriteoViewBasket(state) {
criteoViewBasket(state.cartProductList); criteoViewBasket(state.cartProductList);
}, },
setListrakCartList(state) { setListrakCartList(state) {
@ -85,7 +85,7 @@ export const userCartProduct = {
}, },
setListrakCartListClear(){ setListrakCartListClear(){
listrakCartListClear() listrakCartListClear()
}, },*/
setCartProductDetails(state, details) { setCartProductDetails(state, details) {
state.cartProductDetails = details state.cartProductDetails = details
}, },
@ -208,7 +208,7 @@ export const userCartProduct = {
commit('cartTotalAmtProgress', false); commit('cartTotalAmtProgress', false);
commit('setCartDrawer', false); commit('setCartDrawer', false);
await dispatch('cartProductList'); await dispatch('cartProductList');
dispatch('setListrakCartListClear') // dispatch('setListrakCartListClear')
} }
} catch (err) { } catch (err) {
@ -367,7 +367,7 @@ export const userCartProduct = {
} }
}, 3000); }, 3000);
}, },
setCriteoViewBasket: async({ commit ,state}) => { /* setCriteoViewBasket: async({ commit ,state}) => {
if(state.cartProductList.length > 0) if(state.cartProductList.length > 0)
{ {
commit('setCriteoViewBasket'); commit('setCriteoViewBasket');
@ -384,6 +384,6 @@ export const userCartProduct = {
{ {
commit('setListrakCartListClear'); commit('setListrakCartListClear');
} }
}, },*/
} }
} }