hmm…without PHP…afaik EE users either templates or segments to construct URLs but I am not sure if this is enough.
How many IDs are we talking and will they change?
Few things I can thinks of:
1. template/segment approach:
one possible way would be having http://site.com/index.php/template_id_x/view/something/
and then you can grab the {segment_1} which essentially =“tempalte_id_x” and you could stick it into a hidden field.
2. global variable approach:
Other option (perhaps better so you don’t have to have IDs in URLs at all) would be to declare global variable and then call them depending on which page they are.
code logic:
{if my_default_template or segment_1 ='news'}
...use {global_var_1} in hidden form field
{/if}
3. storing IDs into custom weblog fields:
and perhaps using related entries (these entries could be nothing more than single weblog with singe field called google_id)
{If on entry x use its related field for value of hidden form field}
Again, depends how many IDs will you have and how often will they change…how dynamic all this needs to be.