New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@adv-ui/ma-segment-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adv-ui/ma-segment-wrapper - npm Package Compare versions

Comparing version 1.29.0 to 1.30.0

26

CHANGELOG.md
# CHANGELOG
# 1.29.0 (2022-05-26)
# 1.30.0 (2022-07-05)

@@ -8,2 +8,12 @@

* **Root:** detail view jobs vertical optimizely events ([c32a160](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/commit/c32a160c1f26159fc53eb14f23728237198084ee))
* **Root:** lead jobs vertical optimizely events ([6d58600](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/commit/6d58600335557db6a68e6ab05b4a5529a9c98e2e))
# [1.29.0](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/compare/1.28.0...1.29.0) (2022-05-26)
### Features
* **Root:** rename event ([1df69ed](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/commit/1df69ed83e77418e7bec93b2be6df45a6f5cb469))

@@ -174,5 +184,3 @@

* **middlewares:** extract common events into a enum and reuse it on googleAdsTrackingMiddleware and ([11ea792](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/commit/11ea792a42476e118e3c527629fdf7c8907ea549))
* **middlewares:** move getEventName fn inside it's context in facebook and GoogleAds destination mi ([eabe0fb](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/commit/eabe0fb98085cadcbf53fe1ca048168500b7d0b6))
* **middlewares:** move getMappedEventName inside the eventsMap.js in Facebook and GoogleAds middlew ([669f950](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/commit/669f9501e50185500db64a2012567c1123e23c26))
* **middlewares:** move JSON.parse trick into the utils file and import it directly in facebook and ([7430984](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/commit/7430984e024779a00672add23f6e7aa50d2bd7d5))
* **middlewares:** reestructure facebook and googleAds middlewares with more lexical intention ([1d8ce98](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/commit/1d8ce9868d239d8f34ea8c5fd40fcdea0da4da2c))

@@ -199,3 +207,2 @@ * **middlewares:** rename utils from each destination middleware into a eventsMap ([e9a4f55](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/commit/e9a4f55f57d77ed655f7d88de72a050771351cc6))

* **middlewares:** adds new source middleware in order to be able to send events to facebook ([b801c59](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/commit/b801c5939106303c24c8a03370ca15821cd2f5b5))
* **Root:** update ([0417c84](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/commit/0417c844b78d0b7ebe2b1211ed1812ee54f6c634))

@@ -206,14 +213,5 @@ * **Root:** updates test ([188326d](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/commit/188326d6fec15b2a963c814fbc01336bb3be0d02))

# [1.10.0](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/compare/1.9.0...1.10.0) (2021-06-23)
# 1.10.0 (2021-06-23)
### Features
* **Root:** bump version ([08fdfc5](https://github.mpi-internal.com/scmspain/frontend-ma--segment-wrapper/commit/08fdfc5a507385a0bd013ae43ebdf5ac123c4ea1))
# 1.9.0 (2021-06-07)

@@ -1,2 +0,2 @@

import { isMotorVertical, isMiscVertical, isCarCategory } from '../utils.js';
import { isCarCategory, isJobsVertical, isMiscVertical, isMotorVertical, isRealStateVertical } from '../utils.js';
var detailViewEvent = 'Detail Viewed';

@@ -32,3 +32,15 @@ export function getDetailViewEvents(_ref) {

if (isJobsVertical({
properties: properties
})) {
optimizelyLeadEvents.push('Detail View Jobs');
}
if (isRealStateVertical({
properties: properties
})) {
optimizelyLeadEvents.push('Detail View Real Estate');
}
return optimizelyLeadEvents;
}

@@ -1,2 +0,2 @@

import { isInDetail, isMotorVertical, isMiscVertical, isCarCategory, isRealStateCategory, isSitePrivate } from '../utils.js';
import { isCarCategory, isInDetail, isJobsVertical, isMiscVertical, isMotorVertical, isRealStateCategory, isSitePrivate } from '../utils.js';
var segmentToOptimizelyMap = {

@@ -22,22 +22,22 @@ 'Ad Replied Email': 'Form Lead',

if (isCarCategory({
if (isMotorVertical({
properties: properties
})) {
var carCategoryEventNames = getCategoryEventNames({
var motorCategoryEventNames = getCategoryEventNames({
event: event,
categoryName: 'Cars',
categoryName: 'Motor',
properties: properties
});
optimizelyLeadEvents.push.apply(optimizelyLeadEvents, carCategoryEventNames);
optimizelyLeadEvents.push.apply(optimizelyLeadEvents, motorCategoryEventNames);
}
if (isMotorVertical({
if (isCarCategory({
properties: properties
})) {
var motorCategoryEventNames = getCategoryEventNames({
var carCategoryEventNames = getCategoryEventNames({
event: event,
categoryName: 'Motor',
categoryName: 'Cars',
properties: properties
});
optimizelyLeadEvents.push.apply(optimizelyLeadEvents, motorCategoryEventNames);
optimizelyLeadEvents.push.apply(optimizelyLeadEvents, carCategoryEventNames);
}

@@ -56,2 +56,13 @@

if (isJobsVertical({
properties: properties
})) {
var jobsCategoryEventNames = getCategoryEventNames({
event: event,
categoryName: 'Jobs',
properties: properties
});
optimizelyLeadEvents.push.apply(optimizelyLeadEvents, jobsCategoryEventNames);
}
if (isRealStateCategory({

@@ -58,0 +69,0 @@ properties: properties

@@ -19,13 +19,21 @@ export var OPTIMIZELY_PAGE_TYPES = {

};
export var isCarCategory = function isCarCategory(_ref4) {
export var isJobsVertical = function isJobsVertical(_ref4) {
var properties = _ref4.properties;
return properties.vertical === 'jobs';
};
export var isRealStateVertical = function isRealStateVertical(_ref5) {
var properties = _ref5.properties;
return properties.vertical === 'real estate';
};
export var isCarCategory = function isCarCategory(_ref6) {
var properties = _ref6.properties;
return properties.category_level2 === 'Coches';
};
export var isRealStateCategory = function isRealStateCategory(_ref5) {
var properties = _ref5.properties;
export var isRealStateCategory = function isRealStateCategory(_ref7) {
var properties = _ref7.properties;
return properties.category_level1 === 'Inmobiliaria';
};
export var isSitePrivate = function isSitePrivate(_ref6) {
var properties = _ref6.properties;
export var isSitePrivate = function isSitePrivate(_ref8) {
var properties = _ref8.properties;
return !!properties.ad_site_private;
};
{
"name": "@adv-ui/ma-segment-wrapper",
"version": "1.29.0",
"version": "1.30.0",
"description": "Milanuncios Segment Wrapper",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -151,2 +151,37 @@ export const adRepliedEmailEvents = [

{
scope: 'Listing Ad Replied Email - Jobs',
payload: {
obj: {
event: 'Ad Replied Email',
properties: {
vertical: 'jobs'
}
}
},
optimizelyEvents: [
'Total Leads',
'Total Leads Jobs',
'Total Leads Listing Jobs',
'Form Lead Listing Jobs'
]
},
{
scope: 'Detail Ad Replied Email - Jobs',
payload: {
obj: {
event: 'Ad Replied Email',
properties: {
vertical: 'jobs',
page_type: 'detail'
}
}
},
optimizelyEvents: [
'Total Leads',
'Total Leads Jobs',
'Total Leads Detail Jobs',
'Form Lead Detail Jobs'
]
},
{
scope: 'Listing Ad Replied Email',

@@ -337,2 +372,37 @@ payload: {

{
scope: 'Listing Phone Called - Jobs',
payload: {
obj: {
event: 'Phone Called',
properties: {
vertical: 'jobs'
}
}
},
optimizelyEvents: [
'Total Leads',
'Total Leads Jobs',
'Total Leads Listing Jobs',
'Phone Lead Listing Jobs'
]
},
{
scope: 'Detail Phone Called - Jobs',
payload: {
obj: {
event: 'Phone Called',
properties: {
vertical: 'jobs',
page_type: 'detail'
}
}
},
optimizelyEvents: [
'Total Leads',
'Total Leads Jobs',
'Total Leads Detail Jobs',
'Phone Lead Detail Jobs'
]
},
{
scope: 'Listing Phone Called',

@@ -510,2 +580,37 @@ payload: {

{
scope: 'Listing Ad Replied Favorite - Jobs',
payload: {
obj: {
event: 'Ad Replied Favorite',
properties: {
vertical: 'jobs'
}
}
},
optimizelyEvents: [
'Total Leads',
'Total Leads Jobs',
'Total Leads Listing Jobs',
'Favorite Lead Listing Jobs'
]
},
{
scope: 'Detail Ad Replied Favorite - Jobs',
payload: {
obj: {
event: 'Ad Replied Favorite',
properties: {
vertical: 'jobs',
page_type: 'detail'
}
}
},
optimizelyEvents: [
'Total Leads',
'Total Leads Jobs',
'Total Leads Detail Jobs',
'Favorite Lead Detail Jobs'
]
},
{
scope: 'Listing Ad Replied Favorite',

@@ -683,2 +788,37 @@ payload: {

{
scope: 'Listing Ad Replied Favorite - Jobs',
payload: {
obj: {
event: 'Ad Replied Favorite',
properties: {
vertical: 'jobs'
}
}
},
optimizelyEvents: [
'Total Leads',
'Total Leads Jobs',
'Total Leads Listing Jobs',
'Favorite Lead Listing Jobs'
]
},
{
scope: 'Detail Ad Replied Chat - Jobs',
payload: {
obj: {
event: 'Ad Replied Chat',
properties: {
vertical: 'jobs',
page_type: 'detail'
}
}
},
optimizelyEvents: [
'Total Leads',
'Total Leads Jobs',
'Total Leads Detail Jobs',
'Chat Lead Detail Jobs'
]
},
{
scope: 'Listing Ad Replied Chat',

@@ -685,0 +825,0 @@ payload: {

@@ -0,9 +1,10 @@

import {expect} from 'chai'
import sinon from 'sinon'
import {expect} from 'chai'
import {optimizelyTrackingMiddleware} from '../src/middlewares/destination/optimizely/index.js'
import {
adRepliedChatEvents,
adRepliedEmailEvents,
phoneCalledEvents,
adRepliedFavoriteEvents,
adRepliedChatEvents
phoneCalledEvents
} from './fixtures/events.js'

@@ -10,0 +11,0 @@

@@ -0,3 +1,4 @@

import {expect} from 'chai'
import sinon from 'sinon'
import {expect} from 'chai'
import {optimizelyTrackingMiddleware} from '../src/middlewares/destination/optimizely/index.js'

@@ -43,2 +44,26 @@

optimizelyEvents: ['Detail View', 'Detail View Misc']
},
{
scope: 'Detail Viewed Real Estate',
payload: {
obj: {
event: 'Detail Viewed',
properties: {
vertical: 'real estate'
}
}
},
optimizelyEvents: ['Detail View', 'Detail View Real Estate']
},
{
scope: 'Detail Viewed Jobs',
payload: {
obj: {
event: 'Detail Viewed',
properties: {
vertical: 'jobs'
}
}
},
optimizelyEvents: ['Detail View', 'Detail View Jobs']
}

@@ -45,0 +70,0 @@ ]

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc