In ***magento 1.9*** I am trying to get the ***canonical*** URL for the category 
In the view source, I am getting as 

 

    <link rel="canonical" href="https://domain/categoy" />

I wanted to add the category id also in it can I do that?

can anyone help me how I can add the category Id to the canonical

currently, I am getting as 

    <link rel="canonical" href="https://domainname/caregotyname" />
i also wanted to add the categoty id i don't the correct syntax but something like this is possible 

    <link rel="canonical" id='categoty_id' />

 
I am not sure but something like this