Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugins/compliance-hub/api/ingestor.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const FEATURE_NAME = 'compliance_hub';
});

plugins.register("/i/user_merge", function(ob) {
console.log("compliance hub user merge called", ob.newAppUser, ob.oldAppUser);
var newAppUser = ob.newAppUser;
var oldAppUser = ob.oldAppUser;
if (typeof oldAppUser.consent !== "undefined") {
Expand Down
36 changes: 12 additions & 24 deletions plugins/star-rating/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -1590,43 +1590,31 @@ function uploadFile(myfile, id, callback) {
type: "rating",
"app_id": appId
});
common.db.collection("events" + crypto.createHash('sha1').update("[CLY]_star_rating" + appId).digest('hex')).drop(function() {});
/*if (common.drillDb) {
common.drillDb.collection("drill_events" + crypto.createHash('sha1').update("[CLY]_star_rating" + appId).digest('hex')).drop(function() {});
}*/
if (common.drillDb) {
common.drillDb.collection("drill_events").deleteMany({"a": (appId + ""), "e": "[CLY]_star_rating"}, function() {});
}
});
plugins.register("/i/apps/clear", function(ob) {
var appId = ob.appId;
common.db.collection("events" + crypto.createHash('sha1').update("[CLY]_star_rating" + appId).digest('hex')).remove({
ts: {
$lt: ob.moment.unix()
}
}, function() {});
/*if (common.drillDb) {
common.drillDb.collection("drill_events" + crypto.createHash('sha1').update("[CLY]_star_rating" + appId).digest('hex')).remove({
ts: {
$lt: ob.moment.unix()
}
}, function() {});
}*/
if (common.drillDb) {
common.drillDb.collection("drill_events").deleteMany({"a": (appId + ""), "e": "[CLY]_star_rating", ts: {$lt: ob.moment.valueOf()}}, function() {});
}
});
plugins.register("/i/apps/clear_all", function(ob) {
var appId = ob.appId;
common.db.collection("events" + crypto.createHash('sha1').update("[CLY]_star_rating" + appId).digest('hex')).drop(function() {});
/*if (common.drillDb) {
common.drillDb.collection("drill_events" + crypto.createHash('sha1').update("[CLY]_star_rating" + appId).digest('hex')).drop(function() {});
}*/
if (common.drillDb) {
common.drillDb.collection("drill_events").deleteMany({"a": (appId + ""), "e": "[CLY]_star_rating"}, function() {});
}
});
plugins.register("/i/apps/reset", function(ob) {
var appId = ob.appId;
common.db.collection('feedback_widgets').remove({
type: "rating",
"app_id": appId
});
common.db.collection("events" + crypto.createHash('sha1').update("[CLY]_star_rating" + appId).digest('hex')).drop(function() {});
/*if (common.drillDb) {
common.drillDb.collection("drill_events" + crypto.createHash('sha1').update("[CLY]_star_rating" + appId).digest('hex')).drop(function() {});
}*/
if (common.drillDb) {
common.drillDb.collection("drill_events").deleteMany({"a": (appId + ""), "e": "[CLY]_star_rating"}, function() {});
}
});
plugins.register("/i/device_id", function(ob) {
var appId = ob.app_id;
Expand Down
5 changes: 4 additions & 1 deletion plugins/star-rating/api/ingestor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ var plugins = require('../../pluginManager.js');
var requestProcessor = require('../../../api/ingestor/requestProcessor');
var common = require('../../../api/utils/common.js');

plugins.internalEvents.push('[CLY]_star_rating');
plugins.internalDrillEvents.push("[CLY]_star_rating");
plugins.internalOmitSegments["[CLY]_star_rating"] = ["email", "comment", "widget_id", "contactMe"];

plugins.register("/sdk/process_user", function(ob) {
plugins.internalDrillEvents.push("[CLY]_star_rating");
var params = ob.params;
if (params.qstring.events && params.qstring.events.length && Array.isArray(params.qstring.events)) {
for (var z = 0; z < params.qstring.events.length; z++) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/star-rating/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ describe('Testing Rating plugin', function() {

describe('Verify rating', function() {
it('verify in drill database', function(done) {
drill_db.collection("drill_events").findOne({"a": APP_ID, "e": "[CLY]_star_rating"}, function(err, res) {
drill_db.collection("drill_events").findOne({"a": APP_ID, "e": "[CLY]_star_rating", ts: 1419432000000}, function(err, res) {
if (err) {
done(err);
}
Expand Down
16 changes: 8 additions & 8 deletions ui-tests/cypress/lib/dashboard/analytics/views/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const verifyStaticElementsOfPage = () => {
tooltipText: "Total (unique) value for this period is estimated and corrected using the biggest time buckets from available daily, weekly and monthly stats. Exact total counts are available for this year, month and day periods"
});

cy.verifyElement({
/*cy.verifyElement({
labelElement: viewsDataTableElements().COLUMN_NAME_NEW_USERS_LABEL,
isElementVisible: false,
labelText: "New Users",
Expand All @@ -104,7 +104,7 @@ const verifyStaticElementsOfPage = () => {
cy.verifyElement({
isElementVisible: false,
element: viewsDataTableElements().COLUMN_NAME_NEW_USERS_SORTABLE_ICON,
});
});*/

cy.verifyElement({
labelElement: viewsDataTableElements().COLUMN_NAME_TOTAL_VISITS_LABEL,
Expand Down Expand Up @@ -172,7 +172,7 @@ const verifyStaticElementsOfPage = () => {
element: viewsDataTableElements().COLUMN_NAME_BOUNCE_RATE_SORTABLE_ICON,
});

cy.verifyElement({
/*cy.verifyElement({
labelElement: viewsDataTableElements().COLUMN_NAME_UNIQUE_VIEWS_LABEL,
isElementVisible: false,
labelText: "Unique Views",
Expand All @@ -181,7 +181,7 @@ const verifyStaticElementsOfPage = () => {
cy.verifyElement({
isElementVisible: false,
element: viewsDataTableElements().COLUMN_NAME_UNIQUE_VIEWS_SORTABLE_ICON,
});
});*/
};

const verifyEmptyPageElements = () => {
Expand Down Expand Up @@ -234,12 +234,12 @@ const verifyViewsMetricCard = ({
tooltipText: "The total number of pages viewed, in the selected time period."
});

cy.verifyElement({
/*cy.verifyElement({
labelElement: viewsMetricCardElements.UNIQUE_VIEWS_LABEL,
labelText: "Unique Views",
tooltipElement: viewsMetricCardElements.UNIQUE_VIEWS_TOOLTIP,
tooltipText: "Number of times a page is viewed in your application for the first time by users during a session, in the selected time period."
});
});*/

cy.verifyElement({
labelElement: viewsMetricCardElements.BOUNCE_RATE_LABEL,
Expand All @@ -254,10 +254,10 @@ const verifyViewsMetricCard = ({
elementText: "0",
});

cy.verifyElement({
/*cy.verifyElement({
element: viewsMetricCardElements.UNIQUE_VIEWS_VALUE,
elementText: "0"
});
});*/

cy.verifyElement({
element: viewsMetricCardElements.BOUNCE_RATE_VALUE,
Expand Down
8 changes: 4 additions & 4 deletions ui-tests/cypress/lib/dashboard/home/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ const verifyStaticElementsOfPage = () => {
tooltipText: "The total number of pages viewed, in the selected time period."
});

cy.verifyElement({
/*cy.verifyElement({
labelElement: homePageElements.VIEWS.UNIQUE_VIEWS_LABEL,
labelText: "Unique Views",
tooltipElement: homePageElements.VIEWS.UNIQUE_VIEWS_TOOLTIP,
tooltipText: "Number of times a page is viewed in your application for the first time by users during a session, in the selected time period."
});
});*/

cy.verifyElement({
labelElement: homePageElements.VIEWS.BOUNCE_RATE_LABEL,
Expand Down Expand Up @@ -608,11 +608,11 @@ const verifyFullDataPageElements = () => {
elementText: null,
});

cy.verifyElement({
/*cy.verifyElement({
shouldNot: true,
element: homePageElements.AUDIENCE.AVG_REQUESTS_RECEIVED_NUMBER,
elementText: "0.0",
});
});*/

cy.verifyElement({
element: homePageElements.AUDIENCE.AVG_REQUESTS_RECEIVED_TREND_ICON,
Expand Down
Loading