Skip to content

Commit ec9a19d

Browse files
authored
STRATCONN-5950: Upgrade twitter-ads sdk (#824)
* STRATCONN-5950: Upgrade twitter-ads sdk * update version
1 parent 8ab0178 commit ec9a19d

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

integrations/twitter-ads/lib/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@ TwitterAds.prototype.initialize = function() {
3939
// load universal website tag
4040
if (this.options.universalTagPixelId) {
4141
/* eslint-disable */
42-
(function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);
43-
},s.version='1.1',s.queue=[])})(window,document,'script');
42+
!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);
43+
},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='https://static.ads-twitter.com/uwt.js',
44+
a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');
4445
/* eslint-disable */
4546

4647
this.load('universalTag', function() {
47-
window.twq('init', self.options.universalTagPixelId);
48+
window.twq('config', self.options.universalTagPixelId);
4849
self.ready();
4950
});
5051
} else {

integrations/twitter-ads/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@segment/analytics.js-integration-twitter-ads",
33
"description": "The Twitter Ads analytics.js integration.",
4-
"version": "2.5.2",
4+
"version": "2.5.1",
55
"keywords": [
66
"analytics.js",
77
"analytics.js-integration",

integrations/twitter-ads/test/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ describe('Twitter Ads', function() {
8585
});
8686

8787
it('should initialize twq with the universal tag pixel id if provided', function() {
88-
analytics.called(window.twq, 'init', 'teemo');
88+
analytics.called(window.twq, 'config', 'teemo');
8989
});
9090
});
9191
});

0 commit comments

Comments
 (0)