Follow

You can add custom interactions to your Flash ads within Ad Builder for Flash or via ActionScript. Custom interactions are used in an ad when you want to track how the user interacts with your ad. For example, you can check how many times the user clicked on a button or rolled their mouse over a section. Each custom interaction that you add can be reported up to ten times per impression. For example, if you have an ad with three custom interactions, each interaction can be reported ten times, altogether 30 times for that impression.

There are four types of custom interactions:

  • User Action Counter: To measure user initiated actions like clicking buttons, rolling over a specific section, and so on.

    Note: Clicks refer to clicking on buttons, not clickthroughs. If you want an interaction that measures clickthroughs (to another page), use the Clickthrough custom interaction. The clicks are measured differently in Sizmek reports.

  • Automatic Event Counter: To measure ad events like having a video watched until the end.
  • Clickthrough: To measure clicks and open a new window when clicked.
  • Timer: To measure custom durations in the ad.

There are two ways to add custom interactions to your Flash ads:

Allows you to add custom interactions in Flash using code. You should use this option if you are a developer or if you are familiar with code.

When adding custom interactions with code, remember the following:

  • You must add your code to the FLA file.
  • You must not call the function.

When defining the dynamic interaction for the variable color, use the following sample code:

function EBDeclareCI_DO_NOT_USE()

{

EB.Clickthrough("blue");

EB.Clickthrough("red");

}

 

Code Example

The following is an example of a custom interaction created dynamically. It receives a different value for the variable color depending on the interaction with the Flash, and will report a different color accordingly (such as red or blue).

var color;

//this value changes according to the Flash implementation and interaction within Flash

EB.Clickthrough(color)

The different values need to be added manually to be tracked.

Important: If dynamic interactions are not defined, they will not appear in Sizmek Analytics reports. 

If you added custom interactions dynamically through code, you can scan your ad for these interactions so that you can define them and make sure that they will be displayed in Sizmek reports.

Once you scan your ad, you can then define each interaction. For example, if you created a clickthrough, you can define the clickthrough URL of this interaction.

You can either scan the entire ad, or a specific asset. Select which option best suits you.

Procedure
  1. Open your ad.
  2. Go to Settings > Custom Interactions.
  3. From the Scan drop-down list select:
    • Scan Entire Ad
    • Scan Asset

         Your ad is now scanned for custom interactions.

All interactions that are found are displayed in the Custom Interactions table.

Allows you to add custom interactions manually in Ad Builder for Flash. You should use this option if you are a designer, or are less familiar with code.
You can add a custom interaction manually when you do not want to use code to create interactions, rather you want to use the Ad Builder for Flash. This can be useful if you are less familiar with code and you want an easy way to generate the code for the interactions.

Adding a custom interaction workflow comprises of the following procedures:

  1. Create the custom interaction (see the procedure below according to the type of interaction you are creating).
  2. Place the generated code in the Flash.
  3. Verify the Custom Interaction is functioning.

A 'User Action Counter' measures user initiated actions like clicking buttons, rolling over a specific section, and so on.

Procedure
  1. Open your ad.
  2. Go to Settings > Custom Interactions.
  3. From the Add Interaction drop-down list, select User Action Counter.
  4. Enter the interaction name.
  5. Enter the display name (the name that appears in the Report).
  6. In the URL field, enter the URL that appears after the interaction is triggered.
  7. Click Test URL to check that the link works properly and that you are directed to the correct site.
  8. Select the Include in interaction rate checkbox, if you want this interaction to be included in the interaction rate.
    If you do not select this checkbox, you will not see the interaction in the Interaction Rate metric in the reports.
  9. If required, select the Close the ad parts as a result if the interaction checkbox, to close the Flash elements of the ad when the interaction is triggered.
  10. Click Save Interaction.

An 'Automatic Event Counter' interaction measures ad timeline events, like having a video watched until the end.

Procedure
  1. Open your ad.
  2. Go to Settings > Custom Interactions.
  3. From the Add Interaction drop-down list, select Automatic Event Counter.
  4. Enter the interaction name.
  5. Enter the display name (the name that appears in the Report).
  6. In the URL field, enter the URL that appears after the interaction is triggered.
  7. Click Test URL to check that the link works properly and that you are directed to the correct site.
  8. If required, select the Close the ad parts as a result if the interaction checkbox, to close the Flash elements of the ad when the interaction is triggered.
  9. Click Save Interaction.

A Clickthrough measures clicks and opens a new window when clicked.

Procedure
  1. Open your ad.
  2. Go to Settings > Custom Interactions.
  3. From the Add Interaction drop-down list, select Clickthrough.
  4. Enter the interaction name.
  5. Enter the display name (the name that appears in the Report).
  6. In the URL field, enter the URL that appears after the interaction is triggered.
  7. Click Test URL to check that the link works properly and that you are directed to the correct site.
  8. Expand the Clickthrough URL Settings section.
  9. From the Jump Target drop-down list select where you want the new window to open. The possible options are:
    • New Window
    • Current Frame
    • TopSet the position (X and Y pixels) for the new window.
  1. Set the width and height for the new window.
  2. If required, select the Show Address Bar checkbox.
  3. If required, select the Show Menu Bar checkbox.
  4. Click Save Interaction

A 'Timer' interaction measures custom durations in the ad. For example, how long a game is played.

Procedure
  1. Open your ad.
  2. Go to Settings > Custom Interactions.
  3. From the Add Interaction drop-down list, select Timer.
  4. In the Interaction Type, select one of the following options:
    • Start Timer: If you want to define an interaction for when the timer starts. For example, if you want to track every time a user pressed play to start playing a game.
    • Stop Timer: If you want to define an interaction for when the timer stops. For example, if you want to track every time a user pressed stop, to stop playing a game.
  1. Enter the interaction name.
  2. Enter the display name (the name that appears in the Report).
  3. Click Save Interaction

Once you have created your custom interaction, a code is generated and you now have to add this code to the appropriate place inside your Flash asset. If you are using AS2, you can add this code to a button, or if you are using AS3, you can add this code inside the Action that calls the button.

A custom interaction is displayed within the Flash in the following way:

EB.Clickthrough("red")

When custom interactions are defined in this way and the asset is uploaded to the Sizmek platform, the interactions are automatically tracked and will appear in Sizmek Analytics reports.

If your custom interaction calls are created dynamically, then there is an additional step you need to make to track these interactions in the Sizmek platform, and make sure that they appear in the Sizmek Analytics reports.

When adding custom interactions with code, remember the following:

  • You must add your code to the FLA file.
  • You must not call the function.

Before you Begin!

Verify that the Custom Interaction is not Assigned.

  1. From the Custom Interactions dialog, select the custom interaction you have just defined.

          The generated code appears in the Code Preview window as follows:

screen_CI_NotAssigned

  1. Verify that the Assigned column displays No.

To copy/paste the code inside your Flash:

  1. Click Copy to Clipboard.
  2. Click Close.
  3. If you are using AS2, select the button to which you are adding the custom interaction and click F9 (Actions).
  4. Click Paste.
    If you are using AS3, click F9 (Actions) and click Paste.
  5. If you have created a few different interactions and you want to paste all of them in the relevant locations, you can click Paste to Output Window. This way you do not have to open and close the Custom Interactions dialog each time you want to copy code.
What do you want to do?

Once you have generated your code and placed it in the appropriate place, you need to verify that the interaction was defined correctly. This allows you to test your interactions and make sure they are working.

Procedure
  1. From the Custom Interactions dialog, click Scan.
  2. If your interaction was placed inside the code, you will see that the Assigned column changed to Yes as follows:

    screen_CI_Assigned

  3. Click Save.

You can delete a custom interaction when you no longer need it in your ad, or if a mistake was made and you want to delete it.

If your custom interaction is assigned to elements in your ad, for example a button, then the system will scan your ad and remove the code from the relevant place.

If your custom interaction has no assignments, then it will be deleted automatically.

Once you click Delete, the operation is irreversible; therefore make sure it is the correct interaction before deleting.

  1. From the Custom Interactions dialog, select the row of the custom interaction you are deleting.
  2. Click Delete.
    Your interaction is automatically deleted.
  3. If your interaction is assigned to an element in your ad, your ad is scanned and the code is removed from the relevant place.
  4. Click Delete.
You can edit a custom interaction once it has either been identified from a scan, or created manually. This allows you to modify the interaction's attributes, such as the interaction name, clickthrough URL, etc.
Procedure
  1. From the Custom Interactions dialog, select the row of the custom interaction you are modifying.
  2. Click Edit.

The fields described in the table vary depending on the type of interaction.

Field

Description

Interaction Name

The name of the interaction.

Display Name

The name of the interaction as it appears in reports.

URL

The URL that appears after the interaction is triggered.

Include in Interaction Rate

Indicates that the interaction name will be included in the interaction rate.

Available for User Action Counters.

Close the ad parts as a result of the interaction

Indicates that the Flash elements will close after an interaction is triggered.

Available for User Action Counters, Automatic Event Counters.

Jump Target

Select how you want the URL to open:

New Window: If you want it to open inside a new window.

Current Frame: If you want it to open inside the ad's current frame.

Top: If you want it to open at the top of the page.

Available for Clickthroughs only.

New Window Position

If you selected New Window, define the X and Y position of the new window (in pixels)

Available for Clickthroughs only.

New Window Size

If you selected New Window, define the height and width of the new window.

Available for Clickthroughs only.

Show Address Bar

Indicates that the address bar appears in the clickthrough window.

Available for Clickthroughs only.

Show Menu Bar

Indicates that the menu bar appears in the clickthrough window.

Available for Clickthroughs only.

Interaction Type

Defines the type of Timer:

Start Timer: Select if the interaction tracks when the timer started.

Stop Timer: Select if the interaction tracks when the timer ended.

Available for Timer only.

 

 
Was this article helpful?
0 out of 2 found this helpful
Have more questions? Submit a request

Comments