Skip to content

Commit

Permalink
SwG Release 0.1.22.231 (#38419)
Browse files Browse the repository at this point in the history
  • Loading branch information
alin04 committed Aug 24, 2022
1 parent 372d562 commit 0775e3d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion third_party/subscriptions-project/config.js
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** Version: 0.1.22.230 */
/** Version: 0.1.22.231 */
/**
* Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
*
Expand Down
12 changes: 9 additions & 3 deletions third_party/subscriptions-project/swg-gaa.js
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** Version: 0.1.22.230 */
/** Version: 0.1.22.231 */
/**
* Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
*
Expand Down Expand Up @@ -1503,6 +1503,9 @@ const REGWALL_DIALOG_ID = 'swg-regwall-dialog';
/** ID for the Regwall title element. */
const REGWALL_TITLE_ID = 'swg-regwall-title';

/** Delay used to log 3P button click before redirect */
const REDIRECT_DELAY = 10;

/**
* HTML for the metering regwall dialog, where users can sign in with Google.
* The script creates a dialog based on this HTML.
Expand Down Expand Up @@ -2334,11 +2337,14 @@ class GaaMeteringRegwall {
buttonEl.addEventListener('click', () => {
// Track button clicks.
logEvent({
analyticsEvent: AnalyticsEvent.ACTION_SHOWCASE_REGWALL_GSI_CLICK,
analyticsEvent: AnalyticsEvent.ACTION_SHOWCASE_REGWALL_3P_BUTTON_CLICK,
isFromUserAction: true,
});
// Redirect user using the parent window.
self.open(authorizationUrl, '_parent');
// TODO(b/242998655): Fix the downstream calls for logEvent to be chained to remove the need of delaying redirect.
self.setTimeout(() => {
self.open(authorizationUrl, '_parent');
}, REDIRECT_DELAY);
});

return buttonEl;
Expand Down
8 changes: 4 additions & 4 deletions third_party/subscriptions-project/swg.js
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** Version: 0.1.22.230 */
/** Version: 0.1.22.231 */
/**
* Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
*
Expand Down Expand Up @@ -5070,7 +5070,7 @@ function feCached(url) {
*/
function feArgs(args) {
return Object.assign(args, {
'_client': 'SwG 0.1.22.230',
'_client': 'SwG 0.1.22.231',
});
}

Expand Down Expand Up @@ -6404,7 +6404,7 @@ class ActivityPorts$1 {
'analyticsContext': context.toArray(),
'publicationId': pageConfig.getPublicationId(),
'productId': pageConfig.getProductId(),
'_client': 'SwG 0.1.22.230',
'_client': 'SwG 0.1.22.231',
'supportsEventManager': true,
},
args || {}
Expand Down Expand Up @@ -7348,7 +7348,7 @@ class AnalyticsService {
context.setTransactionId(getUuid());
}
context.setReferringOrigin(parseUrl(this.getReferrer_()).origin);
context.setClientVersion('SwG 0.1.22.230');
context.setClientVersion('SwG 0.1.22.231');
context.setUrl(getCanonicalUrl(this.doc_));

const utmParams = parseQueryString(this.getQueryString_());
Expand Down

0 comments on commit 0775e3d

Please sign in to comment.