Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.

Commit a377833

Browse files
committed
Merge branch 'staging/4.2' into release/4.2
2 parents e630bfc + 5efde54 commit a377833

3 files changed

Lines changed: 60 additions & 26 deletions

File tree

_includes/contact-us-modal.html

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,15 @@ <h2>{{ modalDescription }}</h2>
8181
</label>
8282
</div>
8383
<input type="hidden" name="_next" value="/docs/contact-us-thanks/">
84-
<input type="hidden" name="utm_source-popup" id="utm_source-popup">
85-
<input type="hidden" name="utm_medium-popup" id="utm_medium-popup">
86-
<input type="hidden" name="utm_campaign-popup" id="utm_campaign-popup">
87-
<input type="hidden" name="utm_term-popup" id="utm_term-popup">
88-
<input type="hidden" name="utm_content-popup" id="utm_content-popup">
89-
<input type="hidden" name="client_id-popup" id="client_id-popup">
84+
<input type="hidden" name="utm_source" id="utm_source">
85+
<input type="hidden" name="utm_medium" id="utm_medium">
86+
<input type="hidden" name="utm_campaign" id="utm_campaign">
87+
<input type="hidden" name="utm_term" id="utm_term">
88+
<input type="hidden" name="utm_content" id="utm_content">
89+
<input type="hidden" name="client_id" id="client_id">
90+
<input type="hidden" name="tags" id="tags" value="product">
91+
<input type="hidden" name="form_id" id="form_id" value="contact_us_modal">
92+
<input type="hidden" name="path" id="path" value="">
9093
<input type="text" name="_gotcha" style="display:none">
9194
</div>
9295
<div class="submit-button-container">
@@ -144,17 +147,20 @@ <h2>{{ modalDescription }}</h2>
144147
if (value) {
145148
value = decodeURIComponent(value);
146149
utmData[key] = value;
147-
$form.find('input[name="' + key + '-popup"]').val(value);
150+
$form.find('input[name="' + key + ']').val(value);
148151
}
149152
});
150153

154+
const path = getPath();
155+
$form.find('input[name="path"]').val(path);
156+
151157
const gaCookie = document.cookie.split('; ').find(row => row.startsWith('_ga='));
152158
if (gaCookie) {
153159
const parts = gaCookie.split('.');
154160
if (parts.length >= 4) {
155161
const clientId = parts[2] + '.' + parts[3];
156162
utmData['client_id'] = clientId;
157-
$form.find('input[name="client_id-popup"]').val(clientId);
163+
$form.find('input[name="client_id"]').val(clientId);
158164
}
159165
}
160166
window.dataLayer = window.dataLayer || [];
@@ -251,6 +257,11 @@ <h2>{{ modalDescription }}</h2>
251257
}
252258
}
253259

260+
function getPath() {
261+
const url = new URL(window.location.href);
262+
return url.pathname;
263+
}
264+
254265
function getURLParam(name) {
255266
const results = new RegExp('[?&]' + name + '=([^&#]*)').exec(window.location.href);
256267
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;

docs/contact-us.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ notitle: "true"
202202
<input type="hidden" name="utm_term" id="utm_term">
203203
<input type="hidden" name="utm_content" id="utm_content-popup">
204204
<input type="hidden" name="client_id" id="client_id">
205+
<input type="hidden" name="tags" id="tags" value="product">
206+
<input type="hidden" name="form_id" id="form_id" value="contact_us">
207+
<input type="hidden" name="path" id="path" value="">
205208
<input type="hidden" name="_next" value="/docs/contact-us-thanks/">
206209
<input type="text" name="_gotcha" style="display:none">
207210
</div>
@@ -228,6 +231,11 @@ notitle: "true"
228231
}
229232
});
230233

234+
function getPath() {
235+
const url = new URL(window.location.href);
236+
return url.pathname;
237+
}
238+
231239
function getURLParam(name) {
232240
const results = new RegExp('[?&]' + name + '=([^&#]*)').exec(window.location.href);
233241
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
@@ -255,6 +263,9 @@ notitle: "true"
255263
}
256264
});
257265

266+
const path = getPath();
267+
$form.find('input[name="path"]').val(path);
268+
258269
const gaCookie = document.cookie.split('; ').find(row => row.startsWith('_ga='));
259270
if (gaCookie) {
260271
const parts = gaCookie.split('.');

services/development-services/index.md

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,6 +1308,9 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
13081308
<input type="hidden" name="utm_term" id="utm_term">
13091309
<input type="hidden" name="utm_content" id="utm_content">
13101310
<input type="hidden" name="client_id" id="client_id">
1311+
<input type="hidden" name="tags" id="tags" value="custom dev">
1312+
<input type="hidden" name="form_id" id="form_id" value="dev_unit">
1313+
<input type="hidden" name="path" id="path" value="">
13111314
<div class="hp-container">
13121315
{% assign random_hp = 'hp_' | append: site.time | append: site.time | replace: ' ', '' | slice: 0, 10 %}
13131316
<label for="{{ random_hp }}">Leave this field empty</label>
@@ -1339,19 +1342,19 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
13391342
<div class="form-section">
13401343
<div class="form-element">
13411344
<label for="name">
1342-
<input class="form-control cdu-form-control" value="" placeholder="John Doe" name="name-popup" id="name-popup" type="text" size="40" maxlength="50" aria-invalid="false">
1345+
<input class="form-control cdu-form-control" value="" placeholder="John Doe" name="name" id="name-popup" type="text" size="40" maxlength="50" aria-invalid="false">
13431346
<p>Name</p>
13441347
</label>
13451348
</div>
13461349
<div class="form-element">
13471350
<label for="email">
1348-
<input class="form-control cdu-form-control" value="" placeholder="john@example.com" name="email-popup" id="email-popup" type="email" size="40" maxlength="80" aria-invalid="false">
1351+
<input class="form-control cdu-form-control" value="" placeholder="john@example.com" name="email" id="email-popup" type="email" size="40" maxlength="80" aria-invalid="false">
13491352
<p>Email Address</p>
13501353
</label>
13511354
</div>
13521355
<div style="display: none" class="form-element next">
1353-
<label for="subject-popup" class="select-label">
1354-
<select class="form-control select cdu-form-control" name="subject-popup">
1356+
<label for="subject" class="select-label">
1357+
<select class="form-control select cdu-form-control" name="subject">
13551358
<option value="" disabled>Select Subject</option>
13561359
<option value="Custom Development" selected>Custom Development</option>
13571360
<option value="Technical Support">Technical Support</option>
@@ -1369,7 +1372,7 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
13691372
</div>
13701373
<div class="form-element next">
13711374
<label for="msg-popup">
1372-
<textarea id="msg-popup" class="form-control text-area cdu-form-control cdu-text-area" value="" placeholder="Type your message here" name="message-popup" type="text" size="40" maxlength="800"></textarea>
1375+
<textarea id="msg-popup" class="form-control text-area cdu-form-control cdu-text-area" value="" placeholder="Type your message here" name="message" type="text" size="40" maxlength="800"></textarea>
13731376
<p class="text-area-label">Message</p>
13741377
</label>
13751378
</div>
@@ -1378,9 +1381,9 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
13781381
<fieldset>
13791382
<legend class="accordion-button active">Are you familiar with ThingsBoard? (optional)<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></legend>
13801383
<div class="label-container accordion-content" style="max-height: 134px">
1381-
<label><input id="familiarity-work-with-platform-popup" type="radio" name="thingsboard-popup" value="Yes, I work with the platform"/> Yes, I work with the platform</label>
1382-
<label><input id="familiarity-familiar-popup" type="radio" name="thingsboard-popup" value="Yes, I am familiar with it, but haven’t worked with it"/> Yes, I am familiar with it, but haven’t worked with it</label>
1383-
<label><input id="familiarity-not-familiar-popup" type="radio" name="thingsboard-popup" value="No, I am not familiar with it"/> No, I am not familiar with it</label>
1384+
<label><input id="familiarity-work-with-platform-popup" type="radio" name="thingsboard" value="Yes, I work with the platform"/> Yes, I work with the platform</label>
1385+
<label><input id="familiarity-familiar-popup" type="radio" name="thingsboard" value="Yes, I am familiar with it, but haven’t worked with it"/> Yes, I am familiar with it, but haven’t worked with it</label>
1386+
<label><input id="familiarity-not-familiar-popup" type="radio" name="thingsboard" value="No, I am not familiar with it"/> No, I am not familiar with it</label>
13841387
</div>
13851388
</fieldset>
13861389
<fieldset>
@@ -1402,12 +1405,15 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
14021405
</div>
14031406
</fieldset>
14041407
</div>
1405-
<input type="hidden" name="utm_source-popup" id="utm_source-popup">
1406-
<input type="hidden" name="utm_medium-popup" id="utm_medium-popup">
1407-
<input type="hidden" name="utm_campaign-popup" id="utm_campaign-popup">
1408-
<input type="hidden" name="utm_term-popup" id="utm_term-popup">
1409-
<input type="hidden" name="utm_content-popup" id="utm_content-popup">
1410-
<input type="hidden" name="client_id-popup" id="client_id-popup">
1408+
<input type="hidden" name="utm_source" id="utm_source">
1409+
<input type="hidden" name="utm_medium" id="utm_medium">
1410+
<input type="hidden" name="utm_campaign" id="utm_campaign">
1411+
<input type="hidden" name="utm_term" id="utm_term">
1412+
<input type="hidden" name="utm_content" id="utm_content">
1413+
<input type="hidden" name="client_id" id="client_id">
1414+
<input type="hidden" name="tags" id="tags" value="custom dev">
1415+
<input type="hidden" name="form_id" id="form_id" value="dev_unit_modal">
1416+
<input type="hidden" name="path" id="path" value="">
14111417
<div class="hp-container">
14121418
{% assign random_hp = 'hp_' | append: site.time | append: site.time | replace: ' ', '' | slice: 0, 10 %}
14131419
<label for="{{ random_hp }}">Leave this field empty</label>
@@ -1816,7 +1822,6 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
18161822
});
18171823
});
18181824

1819-
18201825
document.addEventListener('DOMContentLoaded', () => {
18211826
const timelineBlocks = document.querySelectorAll('.mobile-timeline .right > div');
18221827

@@ -1844,6 +1849,7 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
18441849

18451850
utmKeys.forEach(function(key) {
18461851
let value = getURLParam(key);
1852+
18471853
if (value) {
18481854
localStorage.setItem(key, value);
18491855
} else {
@@ -1854,18 +1860,19 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
18541860
value = decodeURIComponent(value);
18551861
utmData[key] = value;
18561862
$form.find('input[name="' + key + '"]').val(value);
1857-
$form.find('input[name="' + key + '-popup"]').val(value);
18581863
}
18591864
});
18601865

1866+
const path = getPath();
1867+
$form.find('input[name="path"]').val(path);
1868+
18611869
const gaCookie = document.cookie.split('; ').find(row => row.startsWith('_ga='));
18621870
if (gaCookie) {
18631871
const parts = gaCookie.split('.');
18641872
if (parts.length >= 4) {
18651873
const clientId = parts[2] + '.' + parts[3];
18661874
utmData['client_id'] = clientId;
18671875
$form.find('input[name="client_id"]').val(clientId);
1868-
$form.find('input[name="client_id-popup"]').val(clientId);
18691876
}
18701877
}
18711878
window.dataLayer = window.dataLayer || [];
@@ -1875,7 +1882,13 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
18751882
});
18761883
}
18771884

1885+
function getPath() {
1886+
const url = new URL(window.location.href);
1887+
return url.pathname;
1888+
}
1889+
18781890
function getURLParam(name) {
1891+
18791892
const results = new RegExp('[?&]' + name + '=([^&#]*)').exec(window.location.href);
18801893
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
18811894
}
@@ -1999,7 +2012,6 @@ description: "Fast delivery of scalable IoT solutions with fixed cost and timeli
19992012
const parentLabel = inputElement.closest('label');
20002013
let potentialErrorHint;
20012014

2002-
20032015
if (parentLabel && parentLabel.nextElementSibling && parentLabel.nextElementSibling.classList.contains('error-message-hint')) {
20042016
potentialErrorHint = parentLabel.nextElementSibling;
20052017
} else {

0 commit comments

Comments
 (0)