Skip to content

Commit

Permalink
[BUGFIX] Make marketing info (and pagefunnel) work again
Browse files Browse the repository at this point in the history
Related #1009
  • Loading branch information
mschwemer committed Oct 4, 2024
1 parent cb74a9c commit 5e06c9b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 14 deletions.
3 changes: 1 addition & 2 deletions Configuration/TypoScript/Marketing/setup.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,10 @@ powermailMarketing {
10 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = Powermail
pluginName = Pi1
pluginName = Pi5
vendorName = In2code
controller = Form
action = marketing
switchableControllerActions.Form.1 = marketing
features.requireCHashArgumentForActionArguments = 0
}
}
13 changes: 7 additions & 6 deletions Resources/Private/Build/JavaScript/Marketing.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ class Marketing {
#sendMarketingInformation() {
const marketingInformation = document.querySelector('#powermail_marketing_information');
const url = marketingInformation.getAttribute('data-url');
let data = '';
data += 'tx_powermail_pi1[language]=' + marketingInformation.getAttribute('data-language');
data += '&id=' + marketingInformation.getAttribute('data-pid');
data += '&tx_powermail_pi1[pid]=' + marketingInformation.getAttribute('data-pid');
data += '&tx_powermail_pi1[mobileDevice]=' + (this.#isMobile() ? 1 : 0);
data += '&tx_powermail_pi1[referer]=' + encodeURIComponent(document.referrer);

let data = new URLSearchParams();
data.append('tx_powermail_pi5[language]', marketingInformation.getAttribute('data-language'));
data.append('id', marketingInformation.getAttribute('data-pid'));
data.append('tx_powermail_pi5[pid]', marketingInformation.getAttribute('data-pid'));
data.append('tx_powermail_pi5[mobileDevice]', (this.#isMobile() ? 1 : 0));
data.append('tx_powermail_pi5[referer]', document.referrer);

fetch(url, {method: 'POST', body: data, cache: 'no-cache'});
};
Expand Down
2 changes: 1 addition & 1 deletion Resources/Public/JavaScript/Powermail/Backend.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Resources/Public/JavaScript/Powermail/Form.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Resources/Public/JavaScript/Powermail/Marketing.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5e06c9b

Please sign in to comment.