Skip to main content

Notifications

Community site session details

Community site session details

Session Id : F25ke144g1iSRsXRp7YXYd
Power Pages - Power Apps Portals
Unanswered

Cookie Consent Dialog

Like (0) ShareShare
ReportReport
Posted on 16 Mar 2025 14:05:19 by
I have managed to implement a cookie consent dialog with my microsoft powerpages site. 
The code is embedded in the Startpage.html and its corresponding css and js files. 
However I want the cookie consent dialog to be displayed regardless of the page that is hit since not all visitors enter the start page but enter a different page with a direct link.. 
Where do I have to place the code in order to achieve this?
 
I have tried theme.css together with header.html (for html markup an javascript), but this doesn't seem to work.
 
Can anyone help please.
 
Kind Regards,
 
Michael
Categories:
  • Suggested answer
    RK2021 Profile Picture
    74 on 27 Mar 2025 at 07:05:07
    Cookie Consent Dialog
    My suggestion would be to place it in the "Page Copy" web template - whilst I would not assume 100% coverage as your setup may differ - this template is included in nearly all basic web templates and ensures any content placed in an individual web page then renders. You can easily address custom web templates by ensuring "page copy" is included in those too. 
     
    (As a test - try and add components via the studio and then check the web page copy section in the management app - this is where MS places your studio content. The page copy web template is what ensures this stuff is actually rendering so you can make a decent assumption it's on all pages).
     
    I have placed my own custom user tracking snippet in page copy and found this was the quickest way to account for users landing on places other than the home page. As ever, I'd suggesting testing to ensure things like profile page and other OOB bits are included too. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,079 Most Valuable Professional

Leaderboard
Loading started