1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

GM:S 1.4 [SOLVED]GameAnalytics Checking for Impressions and Clicks

Discussion in 'Programming' started by nicoltoons, Feb 24, 2019.

  1. nicoltoons

    nicoltoons Member

    Joined:
    Nov 4, 2016
    Posts:
    124
    Hello! So I have this issue measuring clicks and impressions with game analytics.
    I get my data from an external json file ie name of company and url

    I have a button that opens the url but I want to use gameanalytics to know when a user clicks the button to open the url
    According to the documentation, the script I need is ga_addDesignEvent()
    I have been trying to interprete this script :

    This is the script
    ///ga_addDesignEvent(eventId:string, ?value:number)
    if(argument_count == 1)
    {
    addDesignEvent(argument[0]);
    }
    else if(argument_count == 2)
    {
    addDesignEventWithValue(argument[0], argument[1]);
    }
     
  2. matharoo

    matharoo Udemy Instructor

    Joined:
    Jul 9, 2016
    Posts:
    930
    You can use ga_addDesignEvent("event_name") and it should register on the site. It should show up under the design events after at least one event of the type is sent, but it may take a couple days to update.
     
  3. nicoltoons

    nicoltoons Member

    Joined:
    Nov 4, 2016
    Posts:
    124
    matharoo likes this.
  4. nicoltoons

    nicoltoons Member

    Joined:
    Nov 4, 2016
    Posts:
    124
    @matharoo it hasn't thrown an error (for the first time today!) but it says the Variable index is out of range. That's a problem with my loop.
     
  5. matharoo

    matharoo Udemy Instructor

    Joined:
    Jul 9, 2016
    Posts:
    930
    Paste the code and the error here.
     
  6. nicoltoons

    nicoltoons Member

    Joined:
    Nov 4, 2016
    Posts:
    124
    Sorry about the delay @matharoo . I'm still trying the code out
     
  7. nicoltoons

    nicoltoons Member

    Joined:
    Nov 4, 2016
    Posts:
    124
    THis is the error message from the compiler
     

    Attached Files:

  8. matharoo

    matharoo Udemy Instructor

    Joined:
    Jul 9, 2016
    Posts:
    930
    It means that the index that you're trying to access in the array is out of its range. For example, the array can have 3 elements and you might be trying to access the 4th, which doesn't exist.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice