I figured this:
The |(toint) is no longer available in from version 8 on. It was only until version 7. The recomended way now is using the ToInt method.
In some of the UIElements in your DB you can find the notation similar to this
{% tagid | int%}
which is basically the same thing without parenthesis. However this is not documented and isn't supported. I only mention this since you can find this by looking at the configuration of some of the UIElements.
To recapitulate: Use the ToInt macro method, since it's the best practice. The second parameter should be an integer according to documentation therefore I suggest
{%ToInt(tagid, 0)%}
or
{% ToInt(QueryString.tagid, 0)|(identity)GlobalAdministrator%}
and similar for the other one.