Skip to content

[STAGE] Hgi 404 update our pinned version of sentry to v7.40 #742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
6 changes: 5 additions & 1 deletion integrations/google-adwords-new/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
1.3.0 / 2023-02-08
==================
* Introduces a new setting `floodlightAccountId` to enable passing the DoubleClick Floodlight config ID to GTag's `config` to allow better synergy between these two products.

1.2.0 / 2020-02-18
==================

* Introduces a new setting `disableAdPersonalization` to disable collection of remarketing data for users who do not wish to view personalized ads. When this settiing is `true`, Segment will set `allow_ad_personalization_signals` to false.
* Introduces a new setting `disableAdPersonalization` to disable collection of remarketing data for users who do not wish to view personalized ads. When this setting is `true`, Segment will set `allow_ad_personalization_signals` to false.

1.1.1 / 2019-12-09
==================
Expand Down
5 changes: 5 additions & 0 deletions integrations/google-adwords-new/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var GoogleAdWordsNew = (module.exports = integration('Google AdWords New')
.option('pageLoadConversions', [])
.option('defaultPageConversion', '')
.option('disableAdPersonalization', false)
.option('floodlightAccountId', '')
// The ID in this line (i.e. the gtag.js ID) does not determine which account(s) will receive data from the tag; rather, it is used to uniquely identify your global site tag. Which account(s) receive data from the tag is determined by calling the config command (and by using the send_to parameter on an event). For instance, if you use Google Analytics, you may already have the gtag.js global site tag installed on your site. In that case, the gtag.js ID may be that of the Google Analytics property where you first obtained the snippet.
.tag(
'<script src="https://www.googletagmanager.com/gtag/js?id={{ accountId }}">'
Expand Down Expand Up @@ -55,7 +56,11 @@ GoogleAdWordsNew.prototype.initialize = function() {
if (self.options.disableAdPersonalization)
window.gtag('set', 'allow_ad_personalization_signals', false);

if (self.options.floodlightAccountId) {
window.gtag('config', self.options.floodlightAccountId, config);
}
window.gtag('config', self.options.accountId, config);

self.ready();
});
};
Expand Down
2 changes: 1 addition & 1 deletion integrations/google-adwords-new/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@segment/analytics.js-integration-google-adwords-new",
"description": "The google-adwords-new analytics.js integration.",
"version": "1.2.1",
"version": "1.3.0",
"keywords": [
"analytics.js",
"analytics.js-integration",
Expand Down
12 changes: 12 additions & 0 deletions integrations/google-adwords-new/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@ describe('Google AdWords New', function() {
analytics.initialize();
analytics.spy(window, 'gtag');
});

it('should support Doubleclick Floodlight account if provided', function(done) {
var floodlightAccountId = 'DC-1234567';
googleadwordsnew.options.floodlightAccountId = floodlightAccountId;
analytics.once('ready', function() {
analytics.deepEqual(window.gtag.args[1], ['config', floodlightAccountId, {}]);
analytics.deepEqual(window.gtag.args[2], ['config', options.accountId, {}]);
done();
});
analytics.initialize();
analytics.spy(window, 'gtag');
});
});

describe('after loading', function() {
Expand Down
3 changes: 2 additions & 1 deletion integrations/klaviyo/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ function formatItems(track) {
ProductCategories: [product.category()],
ProductURL: product.proxy('properties.productUrl'),
ImageURL: product.proxy('properties.imageUrl'),
SKU: product.sku()
SKU: product.sku(),
ProductID: product.productId() || product.id()
});

// ensure unique $event_id is associated with each Ordered Product event by combining Order Completed
Expand Down
2 changes: 1 addition & 1 deletion integrations/klaviyo/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@segment/analytics.js-integration-klaviyo",
"description": "The Klaviyo analytics.js integration.",
"version": "2.2.4",
"version": "2.2.5",
"keywords": [
"analytics.js",
"analytics.js-integration",
Expand Down
8 changes: 5 additions & 3 deletions integrations/klaviyo/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,13 @@ describe('Klaviyo', function() {
ProductCategories: ['Games'],
ProductURL: 'http://www.example.com/path/to/product',
ImageURL: 'http://www.example.com/path/to/product/image.png',
SKU: '45790-32'
SKU: '45790-32',
ProductID: '507f1f77bcf86cd799439011'
}
]);
});

it('should have the correct $event_id for Ordered Product if id passed as product_id', function() {
it('should have correct $event_id for Ordered Product if id passed as product_id', function() {
analytics.track('Completed Order', {
order_id: '50314b8e9bcf000000000000',
total: 30,
Expand Down Expand Up @@ -362,7 +363,8 @@ describe('Klaviyo', function() {
ProductCategories: ['Games'],
ProductURL: 'http://www.example.com/path/to/product',
ImageURL: 'http://www.example.com/path/to/product/image.png',
SKU: '45790-32'
SKU: '45790-32',
ProductID: '507f1f77bcf86cd799439011'
}
]);
});
Expand Down
12 changes: 5 additions & 7 deletions integrations/sentry/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,22 @@ var Sentry = (module.exports = integration('Sentry')
.global('Sentry')
.option('config', '')
.option('environment', null)
.option('serverName', null)
.option('release', null)
.option('ignoreErrors', []) // still exists, but not documented on Sentry's website
.option('ignoreUrls', [])
.option('whitelistUrls', [])
.option('allowUrls', [])
.option('includePaths', []) // maps to Sentry.Integrations.RewriteFrames plugin
.option('maxMessageLength', null) // deprecated
.option('logger', null)
.option('customVersionProperty', null)
.option('debug', false)
.tag(
'sentry',
'<script src="https://browser.sentry-cdn.com/5.12.1/bundle.min.js" integrity="sha384-y+an4eARFKvjzOivf/Z7JtMJhaN6b+lLQ5oFbBbUwZNNVir39cYtkjW1r6Xjbxg3" crossorigin="anonymous"></script>'
'<script src="https://browser.sentry-cdn.com/7.45.0/bundle.min.js" integrity="sha384-eB2/mQAt3oY62hGYFXiPg18greyp8WT/GvKHlsvdYbvSxBRGEhBqEX8L7giHxzvp" crossorigin="anonymous"></script>'
)
// Sentry.Integrations.RewriteFrames plugin: https://docs.sentry.io/platforms/javascript/#rewriteframes
.tag(
'plugin',
'<script src="https://browser.sentry-cdn.com/5.12.1/rewriteframes.min.js" crossorigin="anonymous"></script>'
'<script src="https://browser.sentry-cdn.com/7.45.0/rewriteframes.min.js" integrity="sha384-m1kRQsSdJkB99lz+1ZvWWjrj0SPH0wXH8y7gvdjHAtKBP8lrLrcv9iF7fOQGL8I0" crossorigin="anonymous"></script>'
));

/**
Expand All @@ -53,8 +51,8 @@ Sentry.prototype.initialize = function() {
environment: this.options.environment,
release: customRelease || this.options.release,
serverName: this.options.serverName,
whitelistUrls: this.options.whitelistUrls,
blacklistUrls: this.options.ignoreUrls,
allowUrls: this.options.allowUrls,
denyUrls: this.options.ignoreUrls,
// ignoreErrors still exists, but is not documented on Sentry's website
// https://github.com/getsentry/sentry-javascript/blob/master/packages/core/src/integrations/inboundfilters.ts#L12
ignoreErrors: this.options.ignoreErrors,
Expand Down