如何使用Google跟踪代码管理器通过第三方脚本的输出跟踪转化价值

问题描述

我正在尝试在GTM中创建一个用户定义的变量,该变量将允许我跟踪BING Ads中的电子商务转化价值,并且唯一需要使用的是第三方脚本,该脚本将以下示例数据输出到“确认”页面的源代码

    dataset_train = pd.read_csv(dataset_path)
    
    training_set = dataset_train.iloc[:,:].values

    from sklearn.preprocessing import MinMaxScaler
    sc = MinMaxScaler(feature_range=(0,1))
    training_set_scaled = sc.fit_transform(x)

    
    print(len(training_set_scaled))
    print(len(dataset_train))

    X_train = []
    y_train = []
    for i in range(past_days,len(training_set_scaled) - future_days + 1):
        X_train.append(training_set_scaled[i - past_days:i,0])
        y_train.append(training_set_scaled[i + future_days - 1:i + future_days,0])
    X_train,y_train = np.array(X_train),np.array(y_train)

    
    ## Building and Training the RNN

    from tensorflow.keras.models import Sequential
    from tensorflow.keras.layers import Dense
    from tensorflow.keras.layers import LSTM
    from tensorflow.keras.layers import Dropout

    ### Initialising the RNN


    regressor = Sequential()

    ### Adding the first LSTM layer and some Dropout regularisation

    regressor.add(LSTM(units=50,input_shape= (?),return_sequences=True))
    regressor.add(Dropout(0.2))

    ### Adding a second LSTM layer and some Dropout regularisation

    regressor.add(LSTM(units=50,return_sequences=True))
    regressor.add(Dropout(0.2))

    ### Adding a third LSTM layer and some Dropout regularisation

    regressor.add(LSTM(units=50,return_sequences=True))
    regressor.add(Dropout(0.2))

    ### Adding a fourth LSTM layer and some Dropout regularisation

    regressor.add(LSTM(units=50))
    regressor.add(Dropout(0.2))

    ### Adding the output layer

    regressor.add(Dense(units=1))

    ### Compiling the RNN

    regressor.compile(optimizer='adam',loss='mean_squared_error')

对于从GTM用户定义的变量列表中使用什么“变量类型”,我感到困惑,即使在这种情况下,即使有一个变量类型也可以在这里使用,我想提取变量值“ orderAmount”来自上面的输出,该输出出现在每个成功的订单上。

据我估计,为此设置一个单独的Bing Ads Universal Event Tracking标签非常简单。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...