Jump to content

How to use variables in Advertisement?


Recommended Posts

There is a need to use variables in advertising (to pass the subid to the advertising widget). But advertising is displayed "as is" and does not accept variables.
Is there any solution for this issue?

Link to comment
Share on other sites

Advertising can use dynamic variables that are passed in URL.

For example if you need to use variable passed like


Then go to Settings -> Website settings and under Dynamic HTTP parameters add this:

and specify its default value (something that should be printed in advertising if no ?adv=555 parameter is passed in URL.

Then in advertising code you can use this:
<ins class="adsbyexoclick" data-zoneid="xxx" data-sub="%adv%"></ins>

If user comes with

then it will be displayed like
<ins class="adsbyexoclick" data-zoneid="xxx" data-sub="555"></ins>

otherwise it will take the default value that you configured.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...