Forum Discussion
MarkSHU
Dec 04, 2023Copper Contributor
Microsoft Clarity
Hi,
I'm trying to connect specific SPO sites to a Microsoft Clarity project using the script below, but it is not connecting up. Can anyone advise on the correct script please. We do not want to connect the whole tenant.
1. Add Clarity App to site - Site Contents > Add App > Clarity
2. Connect-SPOService -url https://domain.sharepoint.com
3. Connect-PnPOnline -URL https://domain.sharepoint.com/sites/staffhome -UseWebLogin
4. Add-SPOSiteCollectionAppCatalog -Site https://domain.sharepoint.com/sites/staffhome
5. Add-PnPCustomAction -ClientSideComponentId "7f8fd1f2-9d26-4a4a-a607-bf4622d7ec11" -Name "Microsoft Clarity" -Title "Microsoft Clarity" -Location ClientSideExtension.ApplicationCustomizer -ClientSideComponentProperties: '{"clarityID":"123456789"}' -Scope site
We have changed the specific project ClarityID.
Thanks, Mark
2 Replies
Sort By
- So I did a blogpost a while back that you can follow:
https://yourmodernworkplace.com/blog/Get-Better-Insight-of-How-Your-Intranet
Your main issue is that you install it on the global app catalog and then deploy it per site you want to use. But I would recommend you to have it on all sites in the background.- MarkSHUCopper ContributorHi, but we do not want to deploy for all sites - we want to create a number of individual campaigns with targeted communication and learning pages. I am trying to establish the correct scripts to achieve this, reference the example on the original post.
Thanks, Mark