Skip to content

Commit

Permalink
SwG Release 0.1.22.234 (#38459)
Browse files Browse the repository at this point in the history
  • Loading branch information
oyj9109 committed Sep 30, 2022
1 parent 9b2cccd commit 318bd3c
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 71 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.233 */
/** Version: 0.1.22.234 */
/**
* Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
*
Expand Down
6 changes: 5 additions & 1 deletion 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.233 */
/** Version: 0.1.22.234 */
/**
* Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
*
Expand Down Expand Up @@ -560,6 +560,8 @@ const AnalyticsEvent = {
IMPRESSION_TWG_PUBLICATION_NOT_SET_UP: 33,
IMPRESSION_REGWALL_OPT_IN: 34,
IMPRESSION_NEWSLETTER_OPT_IN: 35,
IMPRESSION_SUBSCRIPTION_OFFERS_ERROR: 36,
IMPRESSION_CONTRIBUTION_OFFERS_ERROR: 37,
ACTION_SUBSCRIBE: 1000,
ACTION_PAYMENT_COMPLETE: 1001,
ACTION_ACCOUNT_CREATED: 1002,
Expand Down Expand Up @@ -624,6 +626,8 @@ const AnalyticsEvent = {
ACTION_TWG_CHROME_APP_MENU_ENTRY_POINT_CLICK: 1061,
ACTION_TWG_DISCOVER_FEED_MENU_ENTRY_POINT_CLICK: 1062,
ACTION_SHOWCASE_REGWALL_3P_BUTTON_CLICK: 1063,
ACTION_SUBSCRIPTION_OFFERS_RETRY: 1064,
ACTION_CONTRIBUTION_OFFERS_RETRY: 1065,
EVENT_PAYMENT_FAILED: 2000,
EVENT_REGWALL_OPT_IN_FAILED: 2001,
EVENT_NEWSLETTER_OPT_IN_FAILED: 2002,
Expand Down
142 changes: 73 additions & 69 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.233 */
/** Version: 0.1.22.234 */
/**
* Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
*
Expand Down Expand Up @@ -67,6 +67,8 @@ const AnalyticsEvent = {
IMPRESSION_TWG_PUBLICATION_NOT_SET_UP: 33,
IMPRESSION_REGWALL_OPT_IN: 34,
IMPRESSION_NEWSLETTER_OPT_IN: 35,
IMPRESSION_SUBSCRIPTION_OFFERS_ERROR: 36,
IMPRESSION_CONTRIBUTION_OFFERS_ERROR: 37,
ACTION_SUBSCRIBE: 1000,
ACTION_PAYMENT_COMPLETE: 1001,
ACTION_ACCOUNT_CREATED: 1002,
Expand Down Expand Up @@ -131,6 +133,8 @@ const AnalyticsEvent = {
ACTION_TWG_CHROME_APP_MENU_ENTRY_POINT_CLICK: 1061,
ACTION_TWG_DISCOVER_FEED_MENU_ENTRY_POINT_CLICK: 1062,
ACTION_SHOWCASE_REGWALL_3P_BUTTON_CLICK: 1063,
ACTION_SUBSCRIPTION_OFFERS_RETRY: 1064,
ACTION_CONTRIBUTION_OFFERS_RETRY: 1065,
EVENT_PAYMENT_FAILED: 2000,
EVENT_REGWALL_OPT_IN_FAILED: 2001,
EVENT_NEWSLETTER_OPT_IN_FAILED: 2002,
Expand Down Expand Up @@ -230,7 +234,7 @@ class AccountCreationRequest {
*/
toArray(includeLabel = true) {
const arr = [
this.complete_, // field 1 - complete
this.complete_, // field 1 - complete
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -283,7 +287,7 @@ class ActionRequest {
*/
toArray(includeLabel = true) {
const arr = [
this.action_, // field 1 - action
this.action_, // field 1 - action
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -353,8 +357,8 @@ class AlreadySubscribedResponse {
*/
toArray(includeLabel = true) {
const arr = [
this.subscriberOrMember_, // field 1 - subscriber_or_member
this.linkRequested_, // field 2 - link_requested
this.subscriberOrMember_, // field 1 - subscriber_or_member
this.linkRequested_, // field 2 - link_requested
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -631,20 +635,20 @@ class AnalyticsContext {
*/
toArray(includeLabel = true) {
const arr = [
this.embedderOrigin_, // field 1 - embedder_origin
this.transactionId_, // field 2 - transaction_id
this.referringOrigin_, // field 3 - referring_origin
this.utmSource_, // field 4 - utm_source
this.utmCampaign_, // field 5 - utm_campaign
this.utmMedium_, // field 6 - utm_medium
this.sku_, // field 7 - sku
this.readyToPay_, // field 8 - ready_to_pay
this.label_, // field 9 - label
this.clientVersion_, // field 10 - client_version
this.url_, // field 11 - url
this.clientTimestamp_ ? this.clientTimestamp_.toArray(includeLabel) : [], // field 12 - client_timestamp
this.readerSurfaceType_, // field 13 - reader_surface_type
this.integrationVersion_, // field 14 - integration_version
this.embedderOrigin_, // field 1 - embedder_origin
this.transactionId_, // field 2 - transaction_id
this.referringOrigin_, // field 3 - referring_origin
this.utmSource_, // field 4 - utm_source
this.utmCampaign_, // field 5 - utm_campaign
this.utmMedium_, // field 6 - utm_medium
this.sku_, // field 7 - sku
this.readyToPay_, // field 8 - ready_to_pay
this.label_, // field 9 - label
this.clientVersion_, // field 10 - client_version
this.url_, // field 11 - url
this.clientTimestamp_ ? this.clientTimestamp_.toArray(includeLabel) : [], // field 12 - client_timestamp
this.readerSurfaceType_, // field 13 - reader_surface_type
this.integrationVersion_, // field 14 - integration_version
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -714,8 +718,8 @@ class AnalyticsEventMeta {
*/
toArray(includeLabel = true) {
const arr = [
this.eventOriginator_, // field 1 - event_originator
this.isFromUserAction_, // field 2 - is_from_user_action
this.eventOriginator_, // field 1 - event_originator
this.isFromUserAction_, // field 2 - is_from_user_action
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -828,10 +832,10 @@ class AnalyticsRequest {
*/
toArray(includeLabel = true) {
const arr = [
this.context_ ? this.context_.toArray(includeLabel) : [], // field 1 - context
this.event_, // field 2 - event
this.meta_ ? this.meta_.toArray(includeLabel) : [], // field 3 - meta
this.params_ ? this.params_.toArray(includeLabel) : [], // field 4 - params
this.context_ ? this.context_.toArray(includeLabel) : [], // field 1 - context
this.event_, // field 2 - event
this.meta_ ? this.meta_.toArray(includeLabel) : [], // field 3 - meta
this.params_ ? this.params_.toArray(includeLabel) : [], // field 4 - params
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -884,7 +888,7 @@ class AudienceActivityClientLogsRequest {
*/
toArray(includeLabel = true) {
const arr = [
this.event_, // field 1 - event
this.event_, // field 1 - event
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -988,10 +992,10 @@ class CompleteAudienceActionResponse {
*/
toArray(includeLabel = true) {
const arr = [
this.swgUserToken_, // field 1 - swg_user_token
this.actionCompleted_, // field 2 - action_completed
this.userEmail_, // field 3 - user_email
this.alreadyCompleted_, // field 4 - already_completed
this.swgUserToken_, // field 1 - swg_user_token
this.actionCompleted_, // field 2 - action_completed
this.userEmail_, // field 3 - user_email
this.alreadyCompleted_, // field 4 - already_completed
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -1061,8 +1065,8 @@ class EntitlementJwt {
*/
toArray(includeLabel = true) {
const arr = [
this.jwt_, // field 1 - jwt
this.source_, // field 2 - source
this.jwt_, // field 1 - jwt
this.source_, // field 2 - source
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -1206,12 +1210,12 @@ class EntitlementsRequest {
*/
toArray(includeLabel = true) {
const arr = [
this.usedEntitlement_ ? this.usedEntitlement_.toArray(includeLabel) : [], // field 1 - used_entitlement
this.clientEventTime_ ? this.clientEventTime_.toArray(includeLabel) : [], // field 2 - client_event_time
this.entitlementSource_, // field 3 - entitlement_source
this.entitlementResult_, // field 4 - entitlement_result
this.token_, // field 5 - token
this.isUserRegistered_, // field 6 - is_user_registered
this.usedEntitlement_ ? this.usedEntitlement_.toArray(includeLabel) : [], // field 1 - used_entitlement
this.clientEventTime_ ? this.clientEventTime_.toArray(includeLabel) : [], // field 2 - client_event_time
this.entitlementSource_, // field 3 - entitlement_source
this.entitlementResult_, // field 4 - entitlement_result
this.token_, // field 5 - token
this.isUserRegistered_, // field 6 - is_user_registered
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -1281,8 +1285,8 @@ class EntitlementsResponse {
*/
toArray(includeLabel = true) {
const arr = [
this.jwt_, // field 1 - jwt
this.swgUserToken_, // field 2 - swg_user_token
this.jwt_, // field 1 - jwt
this.swgUserToken_, // field 2 - swg_user_token
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -1437,13 +1441,13 @@ class EventParams {
*/
toArray(includeLabel = true) {
const arr = [
this.smartboxMessage_, // field 1 - smartbox_message
this.gpayTransactionId_, // field 2 - gpay_transaction_id
this.hadLogged_, // field 3 - had_logged
this.sku_, // field 4 - sku
this.oldTransactionId_, // field 5 - old_transaction_id
this.isUserRegistered_, // field 6 - is_user_registered
this.subscriptionFlow_, // field 7 - subscription_flow
this.smartboxMessage_, // field 1 - smartbox_message
this.gpayTransactionId_, // field 2 - gpay_transaction_id
this.hadLogged_, // field 3 - had_logged
this.sku_, // field 4 - sku
this.oldTransactionId_, // field 5 - old_transaction_id
this.isUserRegistered_, // field 6 - is_user_registered
this.subscriptionFlow_, // field 7 - subscription_flow
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -1513,8 +1517,8 @@ class FinishedLoggingResponse {
*/
toArray(includeLabel = true) {
const arr = [
this.complete_, // field 1 - complete
this.error_, // field 2 - error
this.complete_, // field 1 - complete
this.error_, // field 2 - error
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -1584,8 +1588,8 @@ class LinkSaveTokenRequest {
*/
toArray(includeLabel = true) {
const arr = [
this.authCode_, // field 1 - auth_code
this.token_, // field 2 - token
this.authCode_, // field 1 - auth_code
this.token_, // field 2 - token
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -1638,7 +1642,7 @@ class LinkingInfoResponse {
*/
toArray(includeLabel = true) {
const arr = [
this.requested_, // field 1 - requested
this.requested_, // field 1 - requested
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -1691,7 +1695,7 @@ class OpenDialogRequest {
*/
toArray(includeLabel = true) {
const arr = [
this.urlPath_, // field 1 - url_path
this.urlPath_, // field 1 - url_path
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -1846,13 +1850,13 @@ class SkuSelectedResponse {
*/
toArray(includeLabel = true) {
const arr = [
this.sku_, // field 1 - sku
this.oldSku_, // field 2 - old_sku
this.oneTime_, // field 3 - one_time
this.playOffer_, // field 4 - play_offer
this.oldPlayOffer_, // field 5 - old_play_offer
this.customMessage_, // field 6 - custom_message
this.anonymous_, // field 7 - anonymous
this.sku_, // field 1 - sku
this.oldSku_, // field 2 - old_sku
this.oneTime_, // field 3 - one_time
this.playOffer_, // field 4 - play_offer
this.oldPlayOffer_, // field 5 - old_play_offer
this.customMessage_, // field 6 - custom_message
this.anonymous_, // field 7 - anonymous
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -1905,7 +1909,7 @@ class SmartBoxMessage {
*/
toArray(includeLabel = true) {
const arr = [
this.isClicked_, // field 1 - is_clicked
this.isClicked_, // field 1 - is_clicked
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -1958,7 +1962,7 @@ class SubscribeResponse$1 {
*/
toArray(includeLabel = true) {
const arr = [
this.subscribe_, // field 1 - subscribe
this.subscribe_, // field 1 - subscribe
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -2028,8 +2032,8 @@ class Timestamp {
*/
toArray(includeLabel = true) {
const arr = [
this.seconds_, // field 1 - seconds
this.nanos_, // field 2 - nanos
this.seconds_, // field 1 - seconds
this.nanos_, // field 2 - nanos
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -2082,7 +2086,7 @@ class ToastCloseRequest {
*/
toArray(includeLabel = true) {
const arr = [
this.close_, // field 1 - close
this.close_, // field 1 - close
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -2135,7 +2139,7 @@ class ViewSubscriptionsResponse {
*/
toArray(includeLabel = true) {
const arr = [
this.native_, // field 1 - native
this.native_, // field 1 - native
];
if (includeLabel) {
arr.unshift(this.label());
Expand Down Expand Up @@ -5071,7 +5075,7 @@ function feCached(url) {
*/
function feArgs(args) {
return Object.assign(args, {
'_client': 'SwG 0.1.22.233',
'_client': 'SwG 0.1.22.234',
});
}

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

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

0 comments on commit 318bd3c

Please sign in to comment.