Sitewide Method addToSitewidePageFoot()

public function addToSitewidePageFoot(
$canSetAnalytics, $canSetSocialMedia
) { //...your PHP code...// }
 

Summary

This method lets you write HTML immediately before the </body> tag of every content item on the site.

Where You Can Use It

From Zenario 10.4 onwards, in modules with the adds_sitewide_html propery set in their description.yaml file.

Description

If you have set the adds_sitewide_html property in your module's description.yaml file then Zenario will call your module's addToSitewidePageFoot() function every time a content item is displayed.

This lets you output HTML that will appear just before the <body> tag of the page is closed.

Parameters

$canSetAnalytics

This will be true or false, depending on whether the visitor has opted into analytics cookies.

$canSetSocialMedia

This will be true or false, depending on whether the visitor has opted into cookies from social media.

Return Value

No return value is needed.