Skip to content

Commit

Permalink
add nl event in blogs
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-rajneeshkumar committed Jan 17, 2025
1 parent 094b7e3 commit 765abe6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion blocks/forms/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function createHubSpotForm(formConfig, target, type = '') {
},
onFormSubmit: (hubspotForm) => {
createSalesforceForm(hubspotForm, formConfig);
if (type === 'newsletter') {
if (type === 'newsletter' || type === 'lab-notes') {
// eslint-disable-next-line no-undef
console.log('Form submitted');

Check warning on line 41 in blocks/forms/forms.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
dataLayer.push({ 'event': 'new_subscriber' });

Check failure on line 42 in blocks/forms/forms.js

View workflow job for this annotation

GitHub Actions / build

'dataLayer' is not defined

Check failure on line 42 in blocks/forms/forms.js

View workflow job for this annotation

GitHub Actions / build

Unnecessarily quoted property 'event' found
Expand Down
2 changes: 1 addition & 1 deletion templates/blog/blog.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default async function decorate() {
}),
);

loadHubSpotScript(createHubSpotForm.bind(null, formConfig, sidebarIframeID));
loadHubSpotScript(createHubSpotForm.bind(null, formConfig, sidebarIframeID, 'lab-notes'));
spectraNewsletter.appendChild(sidebar);
}

Expand Down

0 comments on commit 765abe6

Please sign in to comment.