Displaying alternative navigation menus on specific pages

I have two pages that need to have an alternative navigation menu for google ad purposes. I thought it would be as simple as plugging in some if/else logic in the header.liquid file but I am running in to some issues. This is what I have tried and doesn’t seem to be working:

{% if template == "product.name" %}
          {% include 'alt-nav' %}
          {% else %}
          {% include 'main-nav' %}
          {% endif %}

Hello @kflora ,
Please share your website URL.

Please let me know if anyone sees where I went wrong with this code!

  1. find your header-group.json file and make a copy of it called header-group-2

  2. In the Dawn theme go to your theme.liquid file. Find where your menu is rendered with {% section ‘header-group’ %}

  3. Replace that with this

    {% if template_contains_NAME_OF_YOUR_PAGE_TEMPLATE %}
    {% sections ‘header-group-2’ %}
    {% else %}
    {% sections ‘header-group’ %}
    {% endif %}

  4. Go to you theme editor and you can control which menu you want to appear on the page specified.