How to have content in view-source of page

I am having a problem with Google Ads where they want to verify some assets (phone number) on our website. Now I do show those numbers on my pages, but Google wants them to be present in “view source” of the page. But when I do the view source, I just find a lot of javascript code.

How do I have something show up in ‘view source’?

The page is on version 21 already (which is where I understand it was done such that page will be generated on the server and HTML of the page would be sent)

bumping

Anyone?

I don’t know if this is what you’re looking for, but I just checked, and HTML that I added to the page HTML Header on the page properties window definitely shows up in plain text when I view page source:
image

image

Thanks @msgiblin for the reply. Your suggestion will add content only in head and not body, right?

In general, from what I know, Google likes to see things in body (i.e. as visible to users) instead of them being hidden unless put as part of some meta tags.

However, I think it is a good suggestion to try out. I am going to try it out and let you know if this works with Google Ads.

1 Like

UPDATE: Adding text in head did work I guess. When I applied for the asset again in Google ads after this change, it is approved now. Though I had made the asset available in our contact-us page too so not sure if that played a role as well.

So since it is approved, it is good.

However, the experience is not the ideal now. When the page loads first that text that I have added in head shows up for a second and then the content of the page loads. :frowning:

Also, I am not very sure of how is this practice of having dangling text in head considered from standards of HTML and SEO perspective.

1 Like

Is it possible to give it local CSS tags to keep the formatting invisible?

Any text in head doesn’t support any formatting. Ideally no text is supposed to be there in the head section.

1 Like

Interesting! Unfortunately we’re a bit out of my scope now (although I’ll be doing SEO optimization later this spring so I hope there’s a straightforward answer :smiley: )

Sure. Thanks for the help, though.

1 Like