As far as I've seen for various sites <head> modifications are done by using some custom approaches - like providing some properties on page instance, that are taken into account while rendering layout / master page page. Anyway what is the problem you are looking for a solution?
Basically we want to be able to add tracking code/website testing code to different pages on the site when required. I'd rather do this without development time if possible. Do you think it would be a lot of work for a developer to add this functionality?
If you are using WebForms you can easily do it in Master page for instance:
If you are using MVC you can do it in Layout page for instance:
@model SomeGenericViewModelContaingHeadValue <html> <head attribute="@Model.Property"> ... </head> ... </html>
Of course there should be somewhere a logic what exactly you are going to write to Head element :)
Ah great, thanks - so you mean i'd need to define what parameters would be allowed? I basically want to be able to add Google Content Experiments code, so it should have some consistent code - is that what you mean?
I mean tha somewhere you have to have some sort of business logic that will decide what excatly is added t Html head element, either that's done in code, on fly or in cosmos :) Not really familiar with GCE but I suppose if something need to be added for page head element depending of what kind of page it is and should be editable by CMS editors - then most probably the easiest way would be to add property to base PageData and read and use that while rendering page.
Ah ok, that's really helpful. Thanks for your quick responses! I will chat to our developer, this could be really helpful!
Will keep you posted!
I was just wondering if there was any way of editing the <head> section with the standard development roll out? Or does this require development?