I use this code as the ad company need to know who is logged in and sees 2 adverts in topics, who is a supporter and sees no adverts, and who is a guest (sees 4 adverts in topics plus a footer ad).
<body class='{{if \IPS\Member::loggedIn()->member_id }}logged-in {{endif}}{{if \in_array( \IPS\Member::loggedIn()->member_group_id, array(9,32) ) }}supporter {{endif}}
So I am logged in on my site, the body will look like this
If I am a supporter (this is for those who donate to the site), then it will say logged-in supporter
If I am a guest, logged-in doesn't show and it shows what it normally would. But now the ad company knows to show more adverts to whoever is a guest.
This was the easiest solution we came up with