Skip to content

Commit

Permalink
Added location condition
Browse files Browse the repository at this point in the history
  • Loading branch information
raj-bluetext committed Jun 28, 2024
1 parent 79d9dcf commit c818844
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions blocks/marketo/marketo.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,22 @@ const embedMarketoForm = (marketoId, formId, successUrl) => {
// Add an onSuccess handler
form.onSuccess((values) => {
// Drift API call to commit form data immediately upon form submit
console.log(location.href);

Check warning on line 32 in blocks/marketo/marketo.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
if (typeof drift !== 'undefined') {
drift.on('ready', (api) => {
try {
api.commitFormData({
campaignId: 2787244,
});

// Drift popup custom code
drift.api.collectFormData(values, {
campaignId: 2787244,
followupUrl: successUrl,
stageData: true,
});
if (location.href.includes('/contact')) {
// Drift popup custom code
drift.api.collectFormData(values, {
campaignId: 2787244,
followupUrl: successUrl,
stageData: true,
});
} else { }

Check failure on line 47 in blocks/marketo/marketo.js

View workflow job for this annotation

GitHub Actions / build

Empty block statement

// Adobe Launch tracking for form submission
if (window._satellite) {
Expand Down

0 comments on commit c818844

Please sign in to comment.