Hi @esmaeili,
Thanks for reaching out. I’m sorry for the late response, we’ve been receiving a high number of tickets hence why its taken this long to respond to you.
Since you have access to premium support please submit your ticket there next time you have an issue for quicker response.
Anyway, that being said, lets address the issue in question.
You actually don’t need to add any custom code to achieve this. The toggle should appear automatically on your main events page as long as you’ve enabled more that 1 view.
You can find the setting to enable multiple views under Events → Settings → Display
If this doesn’t solve the issue please submit a ticket on our premium support forum and include the link to this ticket for reference.
Best regards,
Eugene.