I am attempting to add a page change rule at the template level to interact with google tag manager.
However, the rule is not being added to the form.
Can you please provide an explanation why some changes at the template or form level, don't get added to the form?
When a form is created from a template, code in areas of the form that are marked as extension points in the template is locked down in the form after being created, to prevent subsequent template changes from overwriting values in the form.
Since the page controller is normally an extension point, your page change rule is locked down, and will not pick up any changes from the template. This is a safety mechanism to prevent certain template changes from propagating to all the forms based on it.
If you move your extension points below the page controller, changing your page change rule in the template would propagate to forms, but the side effect from that is that you could no longer add new pages to the page controller in a form derived from that template.
So what you are seeing is the relationship between extension points in templates, and forms based on the template.
For example, if you created a form based on a template, then later went back and added new rules, or changed rules in the template under the scope of an extension point, the new template code will not be propagated to the form.
Did you create your own template when you added the rule, and then base your form on the new template?
Did you also publish the template?
Yes, I am modifying a non-library template and adding the rule there. The form was already using the template before I added the rule, but did not appear after template publish+editor page refresh
Yes, I published the template multiple times.