google-marketing-solutions/crmint

InstantBQML 'Create Conversion Event' job sends 'purchase' events and runs over 100 hours

NumesSanguis opened this issue · 8 comments

Created a CRMint pipeline for GA4 (both training and prediction) using: https://instant-bqml.appspot.com/

The pipeline input data is a large website with real visitors, but we set the output location to a test GA4 project (with no real website attached). We're confused about what the last step, "Create Conversion Event", in the prediction pipeline does / is supposed to do.

Running the prediction pipeline on the real data shows us 170,982 ibqml_test_iBQML events in the GA4 interface for the "Send Events to GA4" job.

The last step, "Create Conversion Event" job, does not generate {{ BQ_NAMESPACE }}_iBQML events as expected if you inspect the job, but instead gave us 74 purchase events (for 72 unique users) and is still running after a whole Friday + whole weekend.

  • Could you clarify if this is the expected output of the "Create Conversion Event" job or what should have been the output?
  • Do you also have an idea why this job is taking so long?

Hi there,

The "Create Conversion Event" job in the Instant BQML pipeline uses the Google Analytics Admin API to create a conversion event named {{ BQ_NAMESPACE }}_iBQML based on the events sent via "Send Events to GA4" measurement protocol job which are also named {{ BQ_NAMESPACE }}_iBQML.

This conversion event will appear in your Conversions area in your Property Admin. Here's an image of how the GA4 UI changes following this job.

This functionality is new in order to enable another Google Ads marketing activation to import and bid to conversions.

The job does technically create a new conversion event, but since it is named {{ BQ_NAMESPACE }}_iBQML based on the {{ BQ_NAMESPACE }}_iBQML event created in the pipeline, I'm not sure how it would be related to your purchase event.

What you're describing does not sound like the expected output of the "Create Conversion Event" job.

The job also is not expected to take long.

What version of CRMint are your currently running? Is it based on App Engine or Cloud Run?

My initial guess would be that your current version of CRMint does not support the newly added worker since this was just added to the master repo 3 days ago, unless you deployed CRMint for the first time with Instant BQML.

Thank you for your reply.

What version of CRMint are your currently running? Is it based on App Engine or Cloud Run?

I setup CRMint through the https://instant-bqml.appspot.com/ website, meaning I ran the command (about 1-2 weeks ago):

bash <(curl -Ls https://raw.githubusercontent.com/instant-bqml/crmint/master/scripts/install.sh) master --bundle

In this .sh script, I see the line:

git clone https://github.com/instant-bqml/crmint.git

This instant-bqml repo is 200 commits behind this repository though.

Based on the information in Billing, it seems to be running on App Engine.

  • How can I check the version of our CRMint deployment?
  • Might the .sh script be downloading the wrong CRMint version?

This conversion event will appear in your Conversions area in your Property Admin. Here's an image of how the GA4 UI changes following this job.

Thank you for the screenshot. I do not have any purchase event that ends with _iBQML as by your screenshot in the Admin --> Conversions panel. Only an event called purchase.

My initial guess would be that your current version of CRMint does not support the newly added worker since this was just added to the master repo 3 days ago, unless you deployed CRMint for the first time with Instant BQML.

I downloaded the pipeline JSON file I ran with the above error on 2023.04.11, meaning this was before the worker was added (3 days ago would be 2023.04.13 / .14 depending on timezone).

Hi there,
If you deployed from the Instant BQML fork, the "Create Conversion Action" job was only added on April 6, 2023. So the pipeline you downloaded may not be compatible with your version of CRMint (the reason the repo is 200 commits behind is because it intentionally uses App Engine for CRMint which is not the paradigm for the google/crmint/master branch. So this commit difference is expected.)

My recommendation would be to update your CRMint. In your CRMint Google Cloud Project, simply re-run the deployment command in Cloud Shell: bash <(curl -Ls https://raw.githubusercontent.com/instant-bqml/crmint/master/scripts/install.sh) master --bundle (run it in ephemeral mode if possible).

This will update your CRMint version, likely installing the Create Conversion Event job in your application, which allow the final Instant BQML pipeline job to complete and the event appear in your Google Analytics UI.

Hi, I wanted to update CRMint as by your suggestion, but I run into the error: ModuleNotFoundError: No module named 'appcli'.

I renamed my old crmint folder in my $home directory and set my Cloud Shell to ephemeral mode. Then running your command, I get the error. Here is the full log:

$ bash <(curl -Ls https://raw.githubusercontent.com/instant-bqml/crmint/master/scripts/install.sh) master --bundle
Will run the following command after installing the CRMint command line
 crmint bundle install
Cloning into '/home/some_user/crmint'...
remote: Enumerating objects: 6567, done.
remote: Total 6567 (delta 0), reused 0 (delta 0), pack-reused 6567
Receiving objects: 100% (6567/6567), 3.53 MiB | 9.14 MiB/s, done.
Resolving deltas: 100% (4399/4399), done.
\nCloned crmint repository to your home directory: /home/some_user.
Already on 'master'
Your branch is up to date with 'origin/master'.
********************************************************************************
You are running apt-get inside of Cloud Shell. Note that your Cloud Shell
machine is ephemeral and no system-wide change will persist beyond session end.

To suppress this warning, create an empty ~/.cloudshell/no-apt-get-warning file.
The command will automatically proceed in 5 seconds or on any key.

Visit https://cloud.google.com/shell/help for more information.
********************************************************************************
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-venv is already the newest version (3.9.2-3).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

Adding a bash function to your /home/some_user/.bashrc file.
Traceback (most recent call last):
  File "/home/some_user/crmint/.venv/bin/crmint", line 5, in <module>
    from appcli import entry_point
ModuleNotFoundError: No module named 'appcli'

Thanks for sharing. There did appear to be a deployment issue impacting the appcli module.

I've pushed those changes to instant-bqml/crmint (which deploys the App Engine version of CRMint).

At this point, I'd recommend:

  1. Deactivate the virtual environment if it's active: deactivate
  2. Remove the .venv directory: rm -rf .venv

Switch to ephemeral mode, execute ls to confirm your shell is refreshed (should only contain README-cloudshell.txt), and re-execute the deploy CRMint command: bash <(curl -Ls https://raw.githubusercontent.com/instant-bqml/crmint/master/scripts/install.sh) master --bundle

If you follow those steps, you shouldn't encounter the appcli issue any longer.

Are we good to close this issue out at this point?

I was internally testing the solution, but haven't touched it lately. In the near future a client project might come up. I will test it again then. Feel free to close it now, but not sure if I can re-open it once I've got time again for this and encounter it again?

Okay, thanks for the quick response. Closing this issue for now. Feel free to reopen should you run into this or another issue in the future.