@salesforcedevs/dw-components 1.3.342 → 1.3.349

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dw-components",
3
- "version": "1.3.342",
3
+ "version": "1.3.349",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -26,5 +26,5 @@
26
26
  "@types/setimmediate": "1.0.4",
27
27
  "setimmediate": "1.0.5"
28
28
  },
29
- "gitHead": "b22e5b8720d2780240cdba99bd3942ec32f58356"
29
+ "gitHead": "2839bde416f63b7e141164997f3356fcd8d5ff9f"
30
30
  }
@@ -119,6 +119,21 @@ export default class DeSignupForm extends LightningElement {
119
119
  );
120
120
  }
121
121
 
122
+ trackFormCompletion(target: EventTarget, formData: SignupForm, convertingPage = "success") {
123
+ trackGtm(target!, "custEv_formCompletion", {
124
+ converting_page: `SFDC:us:signup:${convertingPage}`,
125
+ converting_page_url:
126
+ `https://developer.salesforce.com/signup/${convertingPage}`,
127
+ form_country: formData.user.country,
128
+ form_name: "Dev Edition Signup",
129
+ form_primary_product_interest: "Developer Edition",
130
+ offer_id: `form-builder|dev-edition-signup|${DEFAULT_DRIVER}AAA`,
131
+ offer_type: "free trial",
132
+ name_capture_campaign_id: `${DEFAULT_DRIVER}AAA`,
133
+ form_join_id_unique: formData.form_join_id_unique
134
+ });
135
+ }
136
+
122
137
  handleSubmit(event: Event): void {
123
138
  event.preventDefault();
124
139
 
@@ -156,22 +171,12 @@ export default class DeSignupForm extends LightningElement {
156
171
  authentication_type: "dev edition",
157
172
  new_registration: true
158
173
  });
159
- trackGtm(event.target!, "custEv_formCompletion", {
160
- converting_page: "SFDC:us:signup:success",
161
- converting_page_url:
162
- "https://developer.salesforce.com/signup/success",
163
- form_country: formData.user.country,
164
- form_name: "Dev Edition Signup",
165
- form_primary_product_interest: "Developer Edition",
166
- offer_id: `form-builder|dev-edition-signup|${DEFAULT_DRIVER}AAA`,
167
- offer_type: "free trial",
168
- name_capture_campaign_id: `${DEFAULT_DRIVER}AAA`,
169
- form_join_id_unique: formData.form_join_id_unique
170
- });
174
+ this.trackFormCompletion(event.target!, formData, "success");
171
175
  window.location.href = "/signup/success";
172
176
  })
173
177
  .catch((error) => {
174
178
  if (error.message === ErrorCode.GENERIC && didSubmitTimeout) {
179
+ this.trackFormCompletion(event.target!, formData, "account-verification");
175
180
  // If the timeout time has passed at the point of error, and the error code is simply "GENERIC",
176
181
  // we do not know whether the org will ultimately be created (and we have no current way of confirming),
177
182
  // so we navigate the user to an interim page that tells them to watch their email.